Choose when to move along a path (good for RTS games/Clash Royale


#1

https://ready.app.link/uWcqGgmqjN
@Ready

The “MOVE RECORDER” behaviour makes a sprite move along a path as soon as a game starts.
This can be once or in a continuous loop
What if you only want a sprite to move along a path only when you want to? and be able to choose which path?

This code demo can show how to do this.
The Octopus can be dragged.
Click a STAR or HAT or ROCKET
When the sprite clicked touches the Octopus, the Octopus will stick to that sprite and hitch a ride.
Clicking a different sprite while hitching a ride will stop the Octopus from riding it’s current sprite.

This type of code can be used in Realtime strategy games for example:

You can draw multiple paths to different locations in the editor.
When a games running you can click to make a clone, then click where you want the clone to move to.
Then that clone can follow an invisible path to the destination. The sprite the clones hitches a ride on can be invisible as well.

For a PAC MAN type game, you can make the ghosts move to the players area in a maze, instead of the ghosts just mindlessly following a single path in a loop

@davidsol @Ready
This project ran perfectly when created.
After i saved and published the project, the sprites “Rocket,Star,Hat” don’t move at all now.
“READY” seems to be glitching and can’t handle this simple code.


#2

Hi @Suzzy-Grey - This is an amazing logic. I’ll try to fix the project. Did you create this project in the same version of the Ready? Or used different versions?


#3

@Suzzy-Grey - i fixed the your project, try the this version: https://ready.app.link/uWcqGgmqjN

(The problem was that the ways for objects in the “Move Recorder” behavior were not preserved. Maybe that’s what happened when you made additional settings)


#4

I replaced my projects link with yours.

Thanks for your assistance.
I still don’t know why the paths disappeared after publishing.


#5

Yes, it’s weird … we’ll try to figure this out


#6

Was any progress made on this issue?i also have problems with path retention after saving.


#7

Hi @Watersharer !
All you need to do - is stop the recording after you have finished making the path.
Steps:

  1. Start motion recording (Record Movement - On)
  2. Stop motion recording (Record Movement - Off)

After that, when you save your project, everything should work.


#8

Great tip. I bet my crab is not moving properly in Catching Crabs.


#9

If you checked all the settings and it seems to you that this does not work correctly, send a link to your project to this chat, I will check it.


#10

https://ready.app.link/zkju4aunVR

I think its working now, seems like properly setting to off saved the move recorder.