Dcm05
Member
So i'm working on a fighting game and i would like each of the players to be able to choose their characters. everything works up until the final bit. When just player one is activated, the code works as normal. but, when player 2 is activated, two instances are created where player two starts and the second character object is controlled by player 1???
This is what i have:
here's player 2's step event
any idea why a second instance is being made? the default controller value is 0 for every character but after changing it the same issue occured...
This is what i have:
Code:
obj_player1 Step Event:
if (room == rm_game) && (done == false)
{
instance_create(player_x, player_y, object_create);
with (instance_create(player_x, player_y, object_create))
{
controller = global.p1_controller;
///global.p1_controller is set to 0
}
done = true;
}
Code:
obj_player2 Step Event:
if (room == rm_game) && (done == false)
{
instance_create(player_x, player_y, object_create);
with (instance_create(player_x, player_y, object_create))
{
controller = global.p2_controller;
///global.p1_controller is set to 1
}
done = true;
}