Please bear with me, this issue I'm having has a few facets to it. I'll try to be clear and brief as possible. Thanks in advance for your help and suggestions.
I'm working on a "turn-based" style of mobile space shooter. Every wave is preceded by an opportunity for the player to tap in the "action area" (where the spaceship and enemies exist) and lay down up to five destination points. Upon activating the action for that wave, the spaceship will follow those points in the order they were created. During this pre-action phase, the player can tap any existing destination point already laid down to delete it. Any destination points that were created after the one being deleted will have their order values decreased - so destination point 4 will become the new 3 when destination point 3 is deleted.
This is a screenshot of my current set up - and I've tried SEVERAL variations (including using a tilemap...but I couldn't work out getting the correct X/Y coordinates for Pathfinder to follow).
The problem I have discovered is that the deletion portion of my script here acts immediately after the creation of the ShipCourse objects, even though I added the stipulation of ON TOUCH END. It shouldn't delete anything YET because the object hasn't even been created until AFTER the touch is finished. At least...that's the check-n-balance I'm trying to work out. I've also tried using the ELSE condition to differentiate between when a ShipCourse object is being created or deleted.
I am quite certain there's a nuance in the way C2/3 reads conditions versus how I understand them. I'd be very grateful for some insight and help. Thanks again!