Y
Ysela_Creyo
Guest
I have this code in my arrows (click on these to select character)
image_index -= 1 (on left arrow obj) and image_index += 1 (on right arrow obj) these codes apply to cpu_object (which is the object I want to change sprite "character" ) in my selection room
for that I'm using this code in the step of CPU_object
the problem is when i Star the game (playing room), the sprite for the cpu_object is ALWAYS the last set in the code for example lest say "spr_mexico", instead of being the one selected previously in the selection_room.
I have no clue.
image_index -= 1 (on left arrow obj) and image_index += 1 (on right arrow obj) these codes apply to cpu_object (which is the object I want to change sprite "character" ) in my selection room
for that I'm using this code in the step of CPU_object
if image_index == 8
{
sprite_index = spr_uruguay;
image_speed = 0;
}
else if image_index == 7
{
sprite_index = spr_portugal;
image_speed = 0;
}
else if image_index == 6
{
sprite_index = spr_mexico;
image_speed = 0;
}
and so on...
{
sprite_index = spr_uruguay;
image_speed = 0;
}
else if image_index == 7
{
sprite_index = spr_portugal;
image_speed = 0;
}
else if image_index == 6
{
sprite_index = spr_mexico;
image_speed = 0;
}
and so on...
the problem is when i Star the game (playing room), the sprite for the cpu_object is ALWAYS the last set in the code for example lest say "spr_mexico", instead of being the one selected previously in the selection_room.
I have no clue.