I have been looking on the forums, and google, and playing around with ideas in C3 and haven't been able to figure this out yet. Any help/suggestions/advice would be greatly appreciated.
When the Start Button is clicked, The Unit should move towards a randomly selected Target using 4-directional tile based movement.
If its a random pick then at some point you have a instance picked right? therefore you know/predetermine which instance is picked.
Example of pseudo code:
Requires 3 global or local variables one for the X position (target_x) and one for the Y position (target_y)of the randomly picked red sprite instance. And the 3rd variable (moving) is for telling the moving sprite to start moving.
If moving = 0 the green sprite doesn't do nothing
If moving = 1 the green sprite starts moving towards the coordinates set at target_x and target_y
And we go as follows:
Condition block
1st condition of the block
When start button is/was/ pressed/released
2nd condition on the same block
pick a random instance of red sprite
Action
set target_x to red sprite.x
set target_y to red sprite.y
set moving to 1
Condition block 2
If moving = 1
Action Green sprite.set position to target_x target_y
if you want it to move pixel by pixel and face the direction
Then we replace the action of green sprite with the following
Action green sprite.movetowards.angle by 5px at angle(self.x,self.y,target_x,target_y)
For a grid like movement is a bit more complicated as you need to calculate the x y block and movement of things and length /step for that u can use the grid movement as would be much easier for you to understand, then me explaining a overcomplicated system in pseudo code.
you might want to take another look for other examples at scirra.com/tutorials if you can't find the answers in the C3 tutorial section or forum. (Google doesn't really help as not all tutorials have visibility in the google ranking as other bigger websites might have better keywording/tagging etc)