I want to make NPC sprites avoid hitting each other. so I decided use is overlapping at offset. however, in the action, how can I pick the source instance and the target instance? so that I can make the source NPC avoids the target NPC.
I dunno if it works with overlapping but with collision it picks the colliding objects and 0 is the one checking and 1 is the one it hit. I think thats the order.
Like I said I have no idea if it works with overlapping
Develop games in your browser. Powerful, performant & highly capable.
thanks for the answer. in on collision , how can I pick 0 from 1. for instance if I want to write
event: On collision with NPC. action: (first npc instance)NPC.x = (second NPC instance)NPC.x -10
(first npc instance)NPC.x = (first npc instance)NPC.x - (second NPC instance)NPC.x
Sorry about my last message, I found what you meant in the manual. I have to use NPC(0).X and NPC(1)
I tested and it works with is overlapping with.
Thanks for the help!