How do you make 2 characters walk at the same time?

Started by ASH DBZKING, Wed 27/09/2006 06:48:25

Previous topic - Next topic

ASH DBZKING

I'm Making a 2-player fighting game and am having trouble making 2 players walk at the same time.
Yahtzee did it at the end of 7 Days.
Help PLZ

SilverWizard_OTF

Well, you should be more specific. Do you want e.g. player to walk and having a character NPC to follow him, or to move two characters at the same time in a combat scene (opponent and player)? Please be more specific ;)

1. With script command character[NPC].follow(...........);

2. character[1].walk(....NO BLOCK.....);
    character[2].walk(....NO BLOCK....);
    wait(120); <--- it depends how long the characters will do to go to the destination you want them to go.

Did i help you?  ;)
"All we have to decide is what to do, with the time that is given to us"

DoorKnobHandle

Actually, you should rather use:

Code: ags

// let both characters walk non-blocking
cChar1.Walk ( ... );
cChar2.Walk ( ... );

while ( cChar1.Moving && cChar2.Moving )
// while both characters are still moving
   // wait
   Wait ( 1 );

ASH DBZKING

Quote from: SilverWizard_OTF on Wed 27/09/2006 10:17:57
to move two characters at the same time in a combat scene (opponent and player)?

This is the one I wanted, and can u give me the code to have the player (script-o-name [EGO]) and the opponant (script-o-name [DEMO]) to move at the same time?

Khris

Player: player or cEgo
Opponent: cDemo

So use player.Walk(...) and cDemo.Walk(...)

For the parameters of the Walk function, why don't you look them up in the manual? Just make sure you use eNoBlock as the blocking param.

SMF spam blocked by CleanTalk