11oyd
Member
Hi, I'm working on a game where you can switch between one of four music genre themed characters but each time you swap characters, the characters swap to a room matched to that character's theme. This operation is working correctly the first time that I perform it but will not work subsequent times. All objects are persistent.
There four character transformations are each coded like this;
key_class = keyboard_check_pressed(ord("Z"))
key_funk = keyboard_check_pressed(ord("X"))
key_rock = keyboard_check_pressed(ord("C"))
if key_class {
instance_create_layer(x,y,0,oClassHero);
room_goto(ClassicalWorld);
show_debug_message("C");
instance_destroy();
}
if key_rock {
instance_create_layer(x,y,0,oRockHero);
room_goto(RockWorld);
show_debug_message("C");
instance_destroy();
}
if key_funk {
instance_create_layer(x,y,0,oFunkHero);
room_goto(FunkWorld);
show_debug_message("C");
instance_destroy();
}
Any help is greatly appreciated!
There four character transformations are each coded like this;
key_class = keyboard_check_pressed(ord("Z"))
key_funk = keyboard_check_pressed(ord("X"))
key_rock = keyboard_check_pressed(ord("C"))
if key_class {
instance_create_layer(x,y,0,oClassHero);
room_goto(ClassicalWorld);
show_debug_message("C");
instance_destroy();
}
if key_rock {
instance_create_layer(x,y,0,oRockHero);
room_goto(RockWorld);
show_debug_message("C");
instance_destroy();
}
if key_funk {
instance_create_layer(x,y,0,oFunkHero);
room_goto(FunkWorld);
show_debug_message("C");
instance_destroy();
}
Any help is greatly appreciated!