Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Kinoko

#101
It's time for another Release Something! I think. The last one was a success so hopefully we can make this one even better! For everyone looking for some motivation to get their game completed or even write a few more words of dialogue, consider this your chance.

ABOUT RELEASE SOMETHING:
This isn't a competition as such, just a big free-for-all where we can all showcase our talents. Basically, a date is set for "Release Something!" Day and on that day, people are invited to post to this thread anything they like, really. For example, some sprites,Ã,  screenshots of your game, music, sound effects, backgrounds, rooms, a plugin, a storyboard, a demo, or if you can manage it, a full game. Heck, even if it's 95% done or 1% done, if you wanna release it, you go for it!

WHEN:
I set the date for October 30th, just in time for Halloween, I guess (even though I don't celebrate it). This gives us just over a month to work on things which I think is plenty of time without being too far away.

Remember, anything you want, as little or as much of it as you want! Get working, people!

Note: This thread will be locked until October 30th. Then you can go nuts.
#102
Okay, this may not be important at all but this code took me a long time to get right so I thought I'd post it just in case anyone wanted to do what I did.

Basically, in my RPG, when you walk into a town, I wanted the town name to fade in and then fade out. I also wanted a little flowery border to animate into existance before the word has faded in and then animate again out of existance after the words have faded out. On top of all this, I needed it all to be non-blocking.

I initially used to script given in the manual under the fade topic, but it relied on a Wait command which was obviously blocking. After a few days, I managed to come up with this which, although it may be hideously intindy scripting, works beautifully.

Code: ags

function FadeName (string areaname, int disptime) {
  displaytime = disptime;
  SetGlobalInt(26, 0);
  CentreGUI(36);
  CentreGUI(37);
  gTownname.Y-=50;
  gTownnameborder.Y-=50;
  SetLabelText(36, 1, areaname);
  gTownname.Transparency = 100;
  SetButtonPic(37, 0, 1, 0);
  GUIOn(37);
  GUIOn(36);
  AnimateButton(37, 0, 35, 2, 2, 0);
  SetTimer(8, 30);
}

//in repeatedly_execute_always:
/////////////////// NAME FADE ////////////////////////
if (IsTimerExpired(8)) { //START
  trans = gTownname.Transparency;
  SetTimer(10, 1);
}

if ((IsTimerExpired(10)) || (IsTimerExpired(9))) {
  if ((trans==0) && (GetGlobalInt(26)==0)) { //WORD COMPLETELY VISIBLE
    SetTimer(9, displaytime);
    SetGlobalInt(26, 2);
  }
  else if ((trans==100) && (GetGlobalInt(26)==1)) GUIOff(37); //FINISH - ALL OFF
  else if ((trans==100) && (GetGlobalInt(26)==2)) { //WORD COMPLETELY INVISIBLE
    GUIOff(36);
    SetGlobalInt(26, 1);
    AnimateButton(37, 0, 35, 3, 2, 0);
    SetTimer(8, 30);
  }
  else { //FADING IN OR OUT
    if (GetGlobalInt(26)==0) trans--;
    else if (GetGlobalInt(26)==2) trans++;
    gTownname.Transparency = trans;
    SetTimer(10, 1);
  }
}


So in the room script, I would have, for example: FadeName ("BORONIA", 200);

There's a bit of new and a bit of old script in this because I currently use a hybrid of them both (I'm always trying to use more and more of the new). Obviously, you would need to customise this for your own timing and word position etc. The other advantage to this code is that you can control the speed of the fade.

If this is useful for anyone, well, I'll be pretty happy. It's working wonderfully for me.

If noone thinks this is useful then please delete the topic!
#103
I'm not currently using any of the betas, just the previous full version of AGS (whatever that is, I'm a bit sleepy and typing from work so I can't check), but I've noticed something lately I can't explain. Some of my object based scripting wasn't activating and all I can put it down to was when the object was NOT checked as `object is initially on/visible`. I was then using object[ x ].Visible = true; to turn it on, but it didn't... er, turn on.

Is/was this a bug? Because if not, I have no idea where I've gone wrong. I worked around it so I don't have any particular problem, but I still wonder why that seemed to be happening.

[edit by scorpiorus to fix object[ x ] ]
#104
This probably isnt going to do much good since I cant post my code here (no net at home yet, and the laptop at work doesnt take my USB drive) but Ill try to give you the gist of my problem anyway.

I have a little mini game involving sequences of objects turning on and off in a paticular room.  Its all triggered with global ints.

Basically, I start a conversation with a character which increases glob. int 25 to say, 3. Its now up to the player to press the right keys in the right order (no time limit involved) so I have a line to the effect of

if ((GetGlobalInt(25)==3) && (keycode==keyx)) MusicNote; // This triggers an increase in the global int among other things
else if ((GetGlobalInt(25)==3) && (keycode!=keyx)) EndMusic; // This basically causes you to lose the mini-game, resetting everything.
if ((GetGlobalInt(25)==4) && (keycode==keyz)) MusicNote;
else if ((GetGlobalInt(25)==4) && (keycode!=keyz)) EndMusic;

Thats roughly it (from memory) and the same code is repeated several times for all the different `levels` of GlobalInt 25.

I hope you can understand my meaning here. Again, sorry I cant post the proper code).

Now, it all works fine except when I execute this, once the situation arises to push the correct key, I press it, MusicNote happens, the GlobalInt goes up and pretty much straight away EndMusic happens.

What I was -hoping- is that you press the correct key, MusicNote happens sending the GI value up, then you press the second correct key, etc etc... I cant figure out why EndMusic is being triggered.

I checked the code from top to bottom and its all working perfectly. I can take the first EndMusic out and then the mini-game doesn:t end until it hits the next line of EndMusic. For some reason, the ` != ` line for the increased GI value is being triggered right after the ` == ` line. I thought maybe having no key pressed was triggering the ` != key ` line, so I added a ` && (keycode!=0) ` line but it made no difference.

Does anyone understand the way keycode works well enough to see whats going wrong here? Im sure its just something to do with the way keycode is triggered/checked.
#105
I'm leaving for Japan on Sunday morning (super early) and as exciting as that concept is, the reality of it all is starting to make me worried about time.

Tomorrow I have to go out and shop for some last minute things, then skip off to pre-departure orientation/dinner and get home very late. Saturday I have to get last minute things, finish packing completely, go to final football game, get home late and try to get to sleep.

I keep going over in my head what I need to do/buy/pack and I've made lists and I think I'm pretty well prepared but I can't help the awful feeling that I'm forgetting this or that, or worse still that I'm not taking advantage of time left with fiance/cat. I know that there's nothing I could do that would leave me satisfied. The time is always going to seem too short, no matter what I do.

I know this experience is going to really strengthen me as a person, and I'm sure it'll be really fun, and it's essential for getting my career started, but... I'm starting to really feel the push of time.

I know for a fact that I wouldn't be worried at all if I were leaving -with- my fiance. It really all comes down to the fact that I'm just gonna miss him like crazy no matter how much we keep in touch, and I've never in my life lived on my own, and I'm wondering how long it's going to take before I'm not scared to go to sleep on my own anymore.

Honestly, I don't know how people live on their own, it drives me nuts. I want to know someone's there with me when I go to sleep, or that I can look forward to them coming home at the end of the day. I know I'll get used to it but still... I'm the sort of person that gets sick of being with my friends after awhile, and I get sick of being out in public or at school/work after awhile, and I LOVE time to myself but I want someone there with me everyday.

I just got engaged and now I have single life to look forward to.

Sorry for my rant, I just needed to vent somewhere.
#106
I need some program my partner and I can use webcams with. He spent hours trying to set up that stupid MS Messenger last night only to find the webcam 'screen' is absolutely puny. We've both got decent webcams and need a nice simple program that'll let us use them relatively easily.

Does anyone know if Skype supports video chat? I don't think it does, but we just signed up to it so... it'd be handy if it does.

ICQ is out. We have old versions of ICQ that don't support webcams and neither of us want the new versions of ICQ with all the other crap that comes with them.

Any help appreciated - thanks!
#107
I was reading something today where a woman was talking about women proposing to men and suggested buying him a watch or something instead of a ring. I read another women gave a bracelet. I was a little surprised because I guess I'd never thought about it in that much detail but I must admit, it seemed a little weird to me. I've never had a problem with women proposing to men, but I never thought the "rules" would be much different. I can see the reasoning though, because men typically just wear one ring whereas I guess some women expect an engagement ring -and- a wedding ring, so you propose with the former.

For the record, I don't... I just picture having one ring. I guess for me it feels a little more special that way. That's just me though, and I'm not saying either way is better or worse. I'm not much for jewellery really so I don't like wearing too many things at once.

Anyway, back on topic. Has anyone here proposed to a guy or know someone who has? What did they do? It's sparked my curiosity because I never thought of doing it with anything but a wedding ring.
#108
www.x-cad.net has an offer on now where if 100000 people sign up before August, they'll get a free copy of a new Mechanical Design program. I've been assured this is quite... the thing. I don't know crap about it to be honest, but if anyone's interested, go sign up and tell your friends!
#109
General Discussion / Script your daily event!
Wed 13/07/2005 13:57:29
I find myself doing this all the time lately, so I imagine I'm not the only one. Basically, write a script that describes a thought process or an action you perform in your daily life.

Here's mine:

function Ignore() {
  cEgo.Animate(currentactivity, vigor);
}

function Go() {
  int rand = Random(10);
  if (toiletcloseby==1) cEgo.Walk (toiletx, toilety, eBlock, eAnywhere);
  else if (toiletcloseby==0) cEgo.Walk (rand, rand, eBlock, eAnywhere);
}

[on key press]
if (urge==1) {
  if (urine<bladder) Ignore();
  if (urine>=bladder) Go();
}

Call me nuts, but I find it fun ^_^
#110
My boyfriend has gone interstate for 3 days, and so I have the house to myself. The noodles I bought to sustain myself during this period tasted like crap so I threw them away. I don't so much care about dinner, but now I want icecream. I'm left with the question, "How do I GET icecream?".

The best I can come up with is ordering a pizza from Pizza Hut just to get their icecreams. I could walk down to the nearest shopping centre but I don't know when it's closing time is (it could be in half an hour) and that means walking 25 minutes each way carrying icecream. Seems a bit silly, but it would be cheaper. Then again, I'd have to walk. Hmm.

You can see my predicament.

In order not to waste this thread, let me ask you. Do you get stupid irrational cravings at times like this?
#111
(I'm sorry for all my threads but I've just been scripting almost non-stop for days so I have a lot of seperate issues.)

I wrote this code in a room script awhile ago to go alongside the character detection and CCS plugins. It always, seemingly, worked fine and today I decided to adjust it:

Code: ags

if ((fawnyaret == CD_COLLISION) && (GetGlobalInt(11)==0)) {
  FaceCharacter(FAWNYA, EGO);
  SetGlobalInt(11, 1);
  }
else if ((fawnyaret == CD_NO_COLLISION) && (GetGlobalInt(11)==1)) {
  SetGlobalInt(11, 0);
  cFawnya.FaceLocation(character[FAWNYA].x, character[FAWNYA].y+5, eNoBlock);
  Wait(1);
}


I basically just added the FaceLocation line so that when I walked away from the NPC, it would face downwards again. I also added to corresponding code in the global script:

if ((fawnyaret == CD_COLLISION) && (IsKeyPressed(keyx)) && (GetGlobalInt(11)==1)) TypeLineSay ("Blah blah blah", 20, 160, 275, 2, -1);

(added bold code) so that you could only talk to the NPC if you were facing each other.

I noticed neither change worked. I couldn't talk to the NPC nor would it turn downwards when I walked away, but it -would- face me when I 'collided' with it.

I tested a few things and discovered that the line " SetGlobalInt(11, 1); " wasn't happening. The GlobalInt is never changing. This would explain perfectly why the code isn't working, but I can't explain why the GlobalInt isn't changing, especially since the line of code directly before it is working.

Is there some problem with changing global ints in a room script? I've already checked both the room script and the global script for any other instance of GlobalInt(11 that might be conflicting but there's nada.
#112
This is really for Scorporius but if anyone else can answer me, please do so ^_^

I'm using the Character Control System plugin (v1.02) and trying to write some code so that a character moves either only on the x axis or only on the y axis.

This is the code for the Y axis movement inside a function I've made:

Code: ags

int currentx = character[charname].x;
StrFormat(randompathy,"MOVE:%d,%d;WAIT:%d;GOTO:1;",currentx, y1, weight);
ccCreateCommand(numb+1, randompathy);


This will work for the first run through but to do it this way I need the command to update the character's y position after every MOVE. Is there some way to make this possible? I've thought of setting a GlobalInt to the currenty variable but I don't think I can get MOVE to use that.
#113
How can I check if any key is currently pressed in repeatedly_execute? I tried keycode which doesn't work outside of on_key_press and I even tried if (on_key_press==0) but yeah, that didn't work (it was a long shot).
#114
Adventure Related Talk & Chat / Facade
Fri 08/07/2005 12:13:14
Has anyone got Facade yet? I saw it was available for download on insertcredit.com a couple of days ago and I'm downloading it now (800MB, yikes). I remember hearing about this awhile ago and being rather interested in it, so now curiosity has got the better of me.

Anyone else have it? Want to tell me it's crap and save me ruining my bandwidth?
#115
Is it possible to have a font+outline with each character made up of more than one colour? For example, if you're going for an Indiana Jones fading effect with a couple of shades. I'm pretty sure this -isn't- possible but how could it be possible? I can only think of having each character made up of several "outlines" each making up a colour section of the font, then having the editor put them back together.
#116
This old code is back for yet another appearance.

Code: ags

#define DIR_DISTANCE 10000
#define DIR_DOWN_LEFT 1
#define DIR_DOWN 2
#define DIR_DOWN_RIGHT 3
#define DIR_LEFT 4
#define DIR_STOP 5
#define DIR_RIGHT 6
#define DIR_UP_LEFT 7
#define DIR_UP 8
#define DIR_UP_RIGHT 9


In repeatedly execute:

Code: ags

if (IsGamePaused()==0) {
Ã,  
	if ((IsKeyPressed (371) > 0) || (IsKeyPressed (55) > 0) || ((IsKeyPressed (372) > 0) && (IsKeyPressed (375) > 0))) Direct = DIR_UP_LEFT;
	else if ((IsKeyPressed (373) > 0) || (IsKeyPressed (57) > 0) || ((IsKeyPressed (372) > 0) && (IsKeyPressed (377) > 0))) Direct = DIR_UP_RIGHT; 
	else if ((IsKeyPressed (379) > 0) || (IsKeyPressed (49) > 0) || ((IsKeyPressed (380) > 0) && (IsKeyPressed (375) > 0))) Direct = DIR_DOWN_LEFT;
	else if ((IsKeyPressed (381) > 0) || (IsKeyPressed (51) > 0) || ((IsKeyPressed (380) > 0) && (IsKeyPressed (377) > 0))) Direct =DIR_DOWN_RIGHT;
	else if ((IsKeyPressed (372) > 0) || (IsKeyPressed (56) > 0)) Direct = DIR_UP; 
	else if ((IsKeyPressed (375) > 0) || (IsKeyPressed (52) > 0)) Direct = DIR_LEFT; 
	else if ((IsKeyPressed (376) > 0) || (IsKeyPressed (53) > 0)) Direct = DIR_STOP; 
	else if ((IsKeyPressed (377) > 0) || (IsKeyPressed (54) > 0)) Direct = DIR_RIGHT; 
	else if ((IsKeyPressed (380) > 0) || (IsKeyPressed (50) > 0)) Direct = DIR_DOWN; 
	else Direct = DIR_STOP;
	
	if (IsKeyPressed(keya)==1) { //RUNNING - 'A' button held down
	
	Ã,  Ã, if (isRunning==0) {
	Ã,  Ã,  Ã,  StopMoving(GetPlayerCharacter());
	Ã,  Ã,  Ã,  SetCharacterSpeed(GetPlayerCharacter(), 12);
	Ã,  Ã,  Ã,  isRunning = 1;
	Ã,  Ã,  Ã,  ReleaseCharacterView(EGO);
	Ã,  Ã,  Ã,  ChangeCharacterView(EGO, 33);
	Ã,  Ã,  Ã,  Direct = DIR_STOP;
	Ã,  Ã, }
	
	} 
Ã,  else {
	
	Ã,  Ã, if (isRunning==1) {
	Ã,  Ã,  Ã,  StopMoving(GetPlayerCharacter());
	Ã,  Ã,  Ã,  SetCharacterSpeed(GetPlayerCharacter(), 6);
	Ã,  Ã,  Ã,  isRunning = 0;
	Ã,  Ã,  Ã,  ReleaseCharacterView(EGO);
	Ã,  Ã,  Ã,  ChangeCharacterView(EGO, 1);
	Ã,  Ã,  Ã,  Direct = DIR_STOP;
	Ã,  Ã, }
	}
	
	if ((PrevDirection != Direct) || (character[EGO].walking == 0)) {
			PrevDirection = Direct;
			CharId = GetPlayerCharacter ();
			if (Direct == DIR_STOP) StopMoving (CharId); // 5 Stop (numeric pad)
			else {
				if (Direct == DIR_UP_LEFT) {
					dx = -DIR_DISTANCE; dy = -DIR_DISTANCE;
					StrCopy (direct, "ul"); 
					} // 7 Home (numeric pad)
				else if (Direct == DIR_UP) {
					dx = 0; dy = -DIR_DISTANCE;
					StrCopy (direct, "u");
					} // 8 Up arrow
				else if (Direct == DIR_UP_RIGHT) { 
					dx = DIR_DISTANCE; dy = -DIR_DISTANCE;
					StrCopy (direct, "ur");
					} // 9 PgUp (numeric pad)
				else if (Direct == DIR_LEFT) { 
					dx = -DIR_DISTANCE; dy = 0; 
					StrCopy (direct, "l");
					} // 4 Left arrow
				else if (Direct == DIR_RIGHT) { 
					dx = DIR_DISTANCE; dy = 0;
					StrCopy (direct, "r");
					} // 6 Right arrow
				else if (Direct == DIR_DOWN_LEFT) { 
					dx = -DIR_DISTANCE; dy = DIR_DISTANCE;
					StrCopy (direct, "dl");
					} // 1 End (numeric pad)
				else if (Direct == DIR_DOWN) { 
					dx = 0; dy = DIR_DISTANCE; 
					StrCopy (direct, "d");
					} // 2 Down arrow
				else if (Direct == DIR_DOWN_RIGHT) { 
					dx = DIR_DISTANCE; dy = DIR_DISTANCE; 
					StrCopy (direct, "dr");
					} // 3 PgDn (numeric pad)
				MoveCharacterStraight (CharId, character [CharId].x + dx, character [CharId].y + dy);
			}
	}
}


At the moment, the code works -great-. I love it. Responds perfectly to keyboard control. There's another feature I'd like to add though.

Basically, when a character is walking along, say, left... if he hits an edge, he stops. Fair enough, but if I then, while holding left still, hold down the 'up' key, he still won't move. In a typical RPG, what would happen is that the character would start moving up along the edge (while still facing left) until it either hit a spot where it could go left/up-left or in neither direction anymore.

Also, even if the character is against an edge, I'd like him to keep "walking" on the spot if I have the key pressed.

One other thing is that if the character is against an edge and I hit a direction key (not hold it down necessarilly) facing that edge, the character won't move because, well, it's an edge. I'd like him to face that direction still, even if there's no walkable area.

I've written down all sorts of basic code ideas but when I try to think practically about how to adjust the above code, I just end up with a headache. Can anyone at least point me in the right direction? I don't know how to ask the game if it's a possibility to walk when I hit a key. It's not as simple as just checking if a certain coordinate is a walkable area or not because the next pixel over isn't necessarilly where the character would move given his speed and that it changes between walking and running.

I've been thinking about this for days and I just can't get my head around it.
#117
I'm trying to write a script so that a certain sound plays as a character walks up stairs. I have a region set up to go on and off as you walk along, basically:



What I tried first is to put in the region interaction for when player steps onto region, simply PlaySound(9);
This didn't work very well, and the sound only went off every now and again and certainly not on every step. I tried thickening the lines, thinning them, and the result didn't vary much. I realise this is because the characters speed doesn't allow him to "walk" on every pixel, (his speed is 6, by the way) so I tried putting this code:

Code: ags

int reg=1;

if (((Region.GetAtRoomXY(player.x, player.y)) == region[2]) && (reg==1)) {
    reg=0;
    PlaySound(9);
}

if (((Region.GetAtRoomXY(player.x, player.y)) != region[2]) && (reg==0)) {
    reg=1;
}


in the room's repeatedly_execute section, and now if I stand on a region, the sound plays continuously. I also tried ==region[0] but it had the same result. I can understand why the first method didn't work, but what's going on with this code?

Does anyone have any other way I could do this?
#118
Why can't we like sports people/teams for who they are? Not the fact that they come from our country.

I'm not usually the kind of person that gives a toss about stars/sports players or anyone in the public eye apart from people who I have a real artistic respect for, or the players I really love in my rugby team, but my god... I love Roger Federer.

He's incredibly skilled, he's nice, he's not a dickhead, he doesn't loose his cool on the tennis court, he doesn't seem fake at all, he doesn't get engaged to a minor celebrity the day after losing a major tennis match to keep people talking about him and forget about what a loser he is (BAM, Lleyton!), and he's just freaking gorgeous.

I always think when most people talk about how "cute" stars or sportspeople are that they must have lowered their standards to some hideous level, because they all look ugly or just very average to me. I can never see what people are talking about. It's like, if I saw that person on the street, I wouldn't give them a second look but everyone drools over them when they're famous and suddenly, it's "Everyone Gets To Be a Sex Symbol" day (there are some exceptions like David Duchovny - I'm not mad about him but he's one of those few you can honestly say is better looking than the average person).

Federer though... he's got a goofy smile but he's the first -genuinely- good looking sportsperson I've seen in a long time. It makes me happy that there's at least one person out there in the tennis world like him. We need more Federers and fewer (read: "no") Lleyton Hewitts.

God, I hate that f*cker. Australians go nuts over him just because he's Australian. "That's not cockiness and a childish anger problem, that's AUSSIE SPIRIT!".
#119
I have overlapping walkable areas so I have this script in my room's repeatedly execute:

if ((GetWalkableAreaAt(player.x, player.y)) == 1) RemoveWalkableArea(5);
if ((GetWalkableAreaAt(player.x, player.y)) == 5) RemoveWalkableArea(1);
if ((GetWalkableAreaAt(player.x, player.y)) == 4) {
  RestoreWalkableArea(1);
  RestoreWalkableArea(5);
}

It -works-, but I get a LOT of slowdown as a result of it checking every second. So, I'd like to put an "if walkable area # is on, remove..." type line in, but (and I'm still getting used to the new style of scripting and even the way the manual is set out, so it could be blatently obvious) I can't find how to do this in the manual.

I'm not even sure if that would prevent the slowdown, since it's still checking(but not constantly "turning off"), but I thought I'd give it a try.
#120
I just saw Minority Report for the first time on tv and I had to leave the room at a couple of points so I missed something, and it's really bugging me! I tried looking for full synopsis but couldn't find any...

Can someone who's seen this film tell me what happened to John's son? I left the room as Agatha started talking to John and his wife in their son's room, and I came back as she was finishing up, and they were crying, and ... now I don't know what she said! o_o
SMF spam blocked by CleanTalk