Two player characters (at the same time)

Started by PIT, Sun 07/01/2007 09:59:59

Previous topic - Next topic

PIT

How can I make two characters walk at the same time.
I mean i have two characters walking with the keyboard, one of them uses W,S,A and D, the other uses the arrow keys.
But I can't make a non-blocking script.

Little help PLZ???

(I ask too many questions don't I)

Akatosh

I guess your command looks like this:

if (keycode==372) cPlayer1.Walk(cPlayer.x, cPlayer.y-5); //Arrow up, player 1 walks up

but, in order to make a non blocking script, you need:

if (keycode==372) cPlayer1.Walk(cPlayer.x, cPlayer.y-5,eNoBlock);


Ashen

eNoBlock is the default for Character.Walk, so I don't think adding it would make any difference unless you'd already had eBlock there. (I which case, you should just need to remove it, not add eNoBlock.)

If Akatosh's suggestion doesn't work, can you show the code you're using to control the Characters? It's possible there's a confict, or something.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk