making a character vanish from a room

Started by , Fri 16/07/2004 10:52:06

Previous topic - Next topic

buckroger

Hi,

I just want to know to make a character vanish from the current room. Example, two characters are colliding (fighting), if one of the characters health reaches 0, he will die and disappear from the room. How do you guys do this?

Thanks!    ;D

Mr Jake

character[XXX].room = Y

XXX = the characters script name.
Y = room number (just make it -1)

buckroger

Thanks HotSpotÃ,  :)

I just did this as you said.

if (AreCharactersColliding(EGO,JACK)==1)
{
Ã,  Display("You're bumping against me!");
Ã,  StopMoving(JACK);
Ã,  character[JACK].room = -1;
}

I set my 2nd character JACK to FollowCharacterEx(JACK, EGO, 1, 10) when EGO enters the room for the first time. But after JACK bumps EGO, he just goes back to his starting position and starts walking towards EGO. JACK is supposed to be in room -1 after he bumps EGO...




buckroger

I guess if I know the right command to stop JACK from following EGO after they collided, this will solve my problem... What's the command for stopping a character from following another character?

Ashen

Use FollowCharacter, and set the character to follow to -1, so:

FollowCharacter (JACK, -1);
I know what you're thinking ... Don't think that.

buckroger

CoolÃ,  8) just tried it and it worked, thanks!Ã,  ;D

SMF spam blocked by CleanTalk