I have a problem with creating an actor with a script.
When my "game" starts up, it shows to pics. No problem here.
Then it goes to the "main menu" of the game.
Here it is supposed to check if variable "Save_game_excists" is equal to 0 or 1.
And if it's 1, it is supposed to create the actor "Load_Game".
Here it goes wrong.
It create's the actor "Load_Game" anyway.
Even when I put this code before the If-Then part.
- Code: Select all
Save_game_excists = 0;
This is the complete code I am using.
- Code: Select all
view.x = 160;
view.y = -120;
CreateActor("Main_menu_pointer_left", "icon", "(none)", "(none)", 0, 0, false);
CreateActor("Main_menu_pointer_right", "icon", "(none)", "(none)", 0, 0, false);
CreateActor("Quit", "icon", "(none)", "(none)", 0, 0, false);
Main_menu_pointer_left.x = New_game.x - 40;
Main_menu_pointer_left.y = New_game.y;
Main_menu_pointer_right.x = New_game.x + 90;
Main_menu_pointer_right.y = New_game.y;
Quit.y = New_game.y + 68;
Quit.x = New_game.x + 20;
if (Save_game_excists == 1);
{
CreateActor("Load_Game", "icon", "(none)", "(none)", 0, 0, false);
Load_Game.y = New_game.y + 34;
Load_Game.x = New_game.x - 3;
}
How can I make it work my way.
I want to create actor "Load_Game" only, when "Save_game_excists'' is equal to 1.
Thanks in advance,
Mark