So I have an arrow that spawns and points in the direction of another sprite, linked to angle towards it based on UID/IID.
The only problem I'm having though, is not spawning duplicate arrows.
Is there an easy way to check if a sprite with a particular instance variable exists already before spawning?
<img src="http://i.imgur.com/IaqC7I1.png" border="0" />
Develop games in your browser. Powerful, performant & highly capable.
I'd just use the uid instead of iid and uid. Here's a way to rework event 190 to stop creation of duplicates. The else is run only when there are no arrows paired with a pickup.
+circleBounds: on collision with BoxPickups
+For each BoxPickups
---+ArrGd: ThnUd = BoxPickups.uid
------- //your creation actions