D
discocar
Guest
so I have an item and when the npc collects the item it will change its animation and speed.
at the moment the NPCs ai is like this
case 1:
// move right
image_xscale=1;
image_speed = 0.1;
sprite_index=sprite20;
speed = 1;
direction = 0;
move_hold = 1;
break;
case 2:
// move left
image_xscale=-1;
image_speed = 0.1;
sprite_index=sprite21;
speed = 1;
direction = 180;
move_hold = 1;
break;
when the npc collects the item to increase its speed I would need to do something like npc collides with the item
speed += 2
but how would I go about changing the sprite animation?
Thanks
at the moment the NPCs ai is like this
case 1:
// move right
image_xscale=1;
image_speed = 0.1;
sprite_index=sprite20;
speed = 1;
direction = 0;
move_hold = 1;
break;
case 2:
// move left
image_xscale=-1;
image_speed = 0.1;
sprite_index=sprite21;
speed = 1;
direction = 180;
move_hold = 1;
break;
when the npc collects the item to increase its speed I would need to do something like npc collides with the item
speed += 2
but how would I go about changing the sprite animation?
Thanks