P
PPowerrr
Guest
Hey guys,
I am making a multiplayer game and I want one of the 2 players to be tagged at the start of the game.
For this I use the code:
This works fine apart from the first line.
If I put
in player one becomes the tagged one.
If I put
in player two becomes the tagged one.
But if I try to randomize it with
it doesn't make any one of the players tagged.
Can anybody please tell me what I am doing wrong?
It would really help me out.
Thanks in advance.
Pim
I am making a multiplayer game and I want one of the 2 players to be tagged at the start of the game.
For this I use the code:
GML:
player_tagged = random_range(1,2);
if (player_tagged = 1)
{
with (oPlayer1)
{
tagged = 1;
}
with (oPlayer2)
{
tagged = 0;
}
}
if (player_tagged = 2)
{
with (oPlayer1)
{
tagged = 0;
}
with (oPlayer2)
{
tagged = 1;
}
}
If I put
Code:
tagged_player = 1;
If I put
Code:
tagged_player = 2;
But if I try to randomize it with
Code:
tagged_player = random_range(1,2);
Can anybody please tell me what I am doing wrong?
It would really help me out.
Thanks in advance.
Pim