Thank you for your reply and Im sorry for not giving a clear explanation. The blue character is for killing the enemy characters.
As for your reply on points-
1 - I tried to use the pathfinder template but I faced 2 problems
a- If I created a box and made it solid, the character would pass through it. Being on same or different layer made no difference.
b- Because of problem "a" I could not figure out if the character will be able to find its "new" path once it collides with the wall or building.
2- Ok i will give it a try. With this, will the yellow character change its path to move to another lamp in the case of first one going out?
3- This is a top view game so they will move straight with bullet behaviour. I will try what you are explaining.
4- I was thinking in similar way.
My main concern is point 1. If I can get that right I will be able to use it on enemies as another layer where they will try to find alternate paths while moving between lamps. It will also need to be implemented on blue player. Then blue player will be able to move one the point selected by user.
One way I thought while writing this reply was to create a dotted line from blue player to the point selected by the user. This dotted line can be drawn only in movable area. The blue player can then follow this line. You think this is possible to achieve?