Velocity
Member
So, I'm working on a fighting game like Street Fighter II.
And I just made a continue room, which is a room where you can either continue fighting and try again, or quit to the main menu.
Like the examples in the video provided.
And I ALSO have an active array of enemies in my game, which I call an "Arcade Ladder".
And I ALSO created a system, where the game takes notice of the current battle room I'm in.
And so my continue is PUTTING me BACK into the ROOM I was in BEFOREHAND.
But I'm not FACING off against the same OPPONENT as before...
So if you lose a fight, an alarm goes off at the end.
Here's the code for it: (note. global.result 1 = Win, and global.result 2 = Draw)
if (global.result = 0)
{
room_goto_next();
}
else
if (global.result = 1)
{
room_goto(rm_continue);
}
else
if (global.result = 2)
{
room_goto(rm_continue);
}
And if you press Enter in the Continue Room, to CONTINUE, it goes to the PREVIOUS room.
Here's the code for if you press enter to continue:
room_goto(global.room_came_from);
In the Battle Room I have this in my Controller Create Event
global.room_came_from = room;
But, I've got an ARRAY, that controls WHICH opponents you face, in my own "Arcade Ladder"
This is in the Arcade Ladder Controller Create event
// Start of level (create)
if (room != rm_kemu)
{
instance_create(512,288, global.enemies[global.level]);
global.level++;
}
And this is in the Arcade Ladder Controller Game Start Event
// Start of game
global.enemies[0] = obj_itachiE;
global.enemies[1] = obj_nejiE;
global.enemies[2] = obj_narutoE ;
global.enemies[3] = obj_kakashiE
global.level = 0;
My PROBLEM is that when I CONTINUE in my Arcade Ladder - EVEN though I'm TRYING to face the same opponent AGAIN, before moving on to the NEXT one - it just cycles me through the NEXT opponent in the array, and continues doing so, opponent after opponent.
My question is, how can I make it so that when I continue - I face the SAME opponent I LOST to before moving on to the next room?
Sorry if this is a little complicated...
And I just made a continue room, which is a room where you can either continue fighting and try again, or quit to the main menu.
Like the examples in the video provided.
And I ALSO have an active array of enemies in my game, which I call an "Arcade Ladder".
And I ALSO created a system, where the game takes notice of the current battle room I'm in.
And so my continue is PUTTING me BACK into the ROOM I was in BEFOREHAND.
But I'm not FACING off against the same OPPONENT as before...
So if you lose a fight, an alarm goes off at the end.
Here's the code for it: (note. global.result 1 = Win, and global.result 2 = Draw)
if (global.result = 0)
{
room_goto_next();
}
else
if (global.result = 1)
{
room_goto(rm_continue);
}
else
if (global.result = 2)
{
room_goto(rm_continue);
}
And if you press Enter in the Continue Room, to CONTINUE, it goes to the PREVIOUS room.
Here's the code for if you press enter to continue:
room_goto(global.room_came_from);
In the Battle Room I have this in my Controller Create Event
global.room_came_from = room;
But, I've got an ARRAY, that controls WHICH opponents you face, in my own "Arcade Ladder"
This is in the Arcade Ladder Controller Create event
// Start of level (create)
if (room != rm_kemu)
{
instance_create(512,288, global.enemies[global.level]);
global.level++;
}
And this is in the Arcade Ladder Controller Game Start Event
// Start of game
global.enemies[0] = obj_itachiE;
global.enemies[1] = obj_nejiE;
global.enemies[2] = obj_narutoE ;
global.enemies[3] = obj_kakashiE
global.level = 0;
My PROBLEM is that when I CONTINUE in my Arcade Ladder - EVEN though I'm TRYING to face the same opponent AGAIN, before moving on to the NEXT one - it just cycles me through the NEXT opponent in the array, and continues doing so, opponent after opponent.
My question is, how can I make it so that when I continue - I face the SAME opponent I LOST to before moving on to the next room?
Sorry if this is a little complicated...