THat's way too complicated & janky, seriously just have a go at what I described - it's not that complex, maybe 20 events tops, plus you'd learn about everything you need to know about c2 events in the process
I would start by doing this:
- decide how you want to do level design (tilemap or separate sprites for collision boxes), screen resolution etc, then lay out a quick map. Give your solids the chipmunk behavior & set to immovable. I usually make a family called fPhys with chipmunk applied, then put physics objects into it instead of applying it to each one.
-make a single unit sprite, add to fPhys to give it the chipmunk behavior, set circular collision shape, give it a 'moving' boolean, a 'maxspeed' var & an 'accel' var (you'll need to play with those values).
-make an array of size 0,1,1 called PathList & add the Unit to a container with it.
-make another sprite offscreen with the pathfinding behavior called Pathfinder, set up it's cellsize to work with your level.
-make a circular sprite called PathNode, these will be the blue circles seen above.
set fPhys chipmunk gravity to 0,0
set Unit.chipmunk.maxspeed to its maxspeed var
-make a mouse onClick event > set PathList to size 0,1,1 (to reset it) > set Pathfinder to Unit position > pathfind to the mouse pos > on path found, for each path point create a PathNode sprite & 'push front' its UID into the PathList array to build a queue of nodes the unit will visit > set Unit 'moving' var to true.
-every tick the unit is moving:
PathList.width= 0, set Unit.moving to false
pick PathNode by UID Pathlist.back > apply a chipmunk force of Unit.accel towards PathNode xy
Unit is overlapping PathNode & that node is in its PathList > clear the UID at that index in the list
Something like that should be enough to get you started, then move on to multiple units, selection system, change size of PAthNodes based on selection size...