N
New_Blerg
Guest
I have two Objects, one is the Player Object and the other is the Background Object. If the players sprite turns blue or grey, I want the background Object to change its sprite to yellow or blue but only if the player is in front of or even touching the Background Object.
In the Players Collission Event with my Object Background this is what I have and it only changes once and stays.
////////////////////////////////////////////////////////////
with (obj_player)
if collision_point( x, y, obj_back_ground+(sprite_index = spr_background_0), false, true)
sprite_index = spr_player_3_red;
else with (obj_player)
if collision_point( x, y, obj_back_ground+(sprite_index = spr_back_ground_8), false, true)
sprite_index = spr_player;
////////////////////////////////////////////////////////////
Thank You for time
In the Players Collission Event with my Object Background this is what I have and it only changes once and stays.
////////////////////////////////////////////////////////////
with (obj_player)
if collision_point( x, y, obj_back_ground+(sprite_index = spr_background_0), false, true)
sprite_index = spr_player_3_red;
else with (obj_player)
if collision_point( x, y, obj_back_ground+(sprite_index = spr_back_ground_8), false, true)
sprite_index = spr_player;
////////////////////////////////////////////////////////////
Thank You for time