Checking to see if character has completed action.

Started by MCF, Fri 19/12/2003 16:28:58

Previous topic - Next topic

MCF

I see from the help files that there is a 'isobjectmoving' command.  Is there any equivalent for characters.

I have a room in which the playable character rings a bell.  A second character enters.  I want that second character to say something when he reaches his destination.  How do I time this?  

Proskrito

#1
if (character[CHARID].walking!=1){ //if charid is not walking
do something;
}
EDIT:
oh, i didnt read your post properly. You could also check in the rep. execute if the character's coords are the same as the ones you told him to go , and then run the action

Hope it helps! : )

MCF

What would be the necessary line to check for x,y coordinates?

If (character[CHARID] ****=1 {
    Display ("BLAH");
}

Scorpiorus

If (character[CHARID].x == ... &&  character[CHARID].y == ...) {
Display ("BLAH");
}

Scummbuddy

Or you could see if they have arrived on a hotspot, or a region.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

BerserkerTails

I don't know if I'm understanding the situation correctly, but here's how I'd do it...

Once the character rings the bell I'd add the code to put the second character into the room, then.

MoveCharacterBlocking (2ndchara, 152, 142, 0);
DisplaySpeech (2ndchara, "Blah blah blah");

I don't know if you want to have control while the 2nd character moves to his destination, in which case, listen to these people, use hotspots or regions.
I make music.

SMF spam blocked by CleanTalk