Hello, I’m doing a 2 player jeopardy game for a school project and I’m having some problems.
This is how it works: When the players see the question they have to press a button on the keyboard and the player who press first gets to answear.
Lets say player 1 have to press left arrow key and player 2 right arrow key, how do I do so when for example player 1 press the key first player 2’s key take no action?
and also when the player who press first gets to answear he has to hold down his key and at the same time press the answear he think is right. So I need something that knows who pressed first to tell what key that need to be pressed to allow an answear.
Heres the code I have atm:
for the key press:
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)){
_root.wp.text += "player 2 gets to answear";
}
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)){
_root.wp.text += "player 1 gets to answear";
}
}
for the answear button (here I need something that does that only the player who pressed first gets to answear):
on (release) {
if (Key.isDown(Key.LEFT))
{
this.gotoAndStop(2);
}}
Thanks and sorry for bad english
// Simon