I am currently making a platformer game.
I want Sprite B to copy Sprite A's movement after 0.25 seconds
Currently, I have given platformer behaviour to both of them.
but on Sprite B, I've put when key is down, wait 0.25seconds, then move.
However, for some reason, Sprite B move a little bit less and a little bit more than Sprite A.
Is there a way for Sprite B to copy Sprite A's movement after 0.25 seconds exactly?
I've been trying days to figure this one out
I would very much appriate it if anyone could give me a hand
I was able to get it to work using platformer enable/disable.
I made a keyboard event of any-key-pressed and set action 1 as sprite 2 platformer disabled, then a wait of 0.25, then a sprite 2 platformer enabled.
I am not sure what your trying to do exactly but it seemed to work like you described. You could change the any-key-pressed to whatever trigger you needed or set it up for each separate keypress.
Thank you for your reply.
However, I think you misunderstood my question.
I will try to explain it more clearly.
This is the example of what I want to achieve.
Please watch around 10:28 mark
Just like how dogs follow the main character.
I would like to recreate that.
Looking forward to hear from you.
In summary, You want to make a follower.
https://www.scirra.com/forum/viewtopic.php?f=147&t=162256&p=983233&hilit=follower#p983233 and some other thread on the forum could help
Try using the lerp feature if you want to make a follower? I am not certain this will work, but it might work...
That looks exactly like how mine looked when I tested it this morning if the sprite-B was also evented to move to sprite-A until overlap if no buttons are pressed...
Develop games in your browser. Powerful, performant & highly capable.
Hey toy for the replay guys.
Chrisinfinger, can you share the project file with me? for some reason I am not getting the result you are saying.
Sprite B does move after 0.25 seconds but it does not travel the same distance as Sprite A.
Also, since it is a platformer game, It is more than just X position. When Sprite A jumps, then Sprite B should jump at the Positon as Sprite A jumped from and follow sprite A's jumping trail in order to sync with Sprite A's movement.
Phantomumboxing, tried Lerp but it wasn't the result I was looking for. Thanks anyway.
MadSpy, I've played with your snakey project and it looks really great. However, is there a way to apply animation to the body of the snake? based on my assessment of your conditions, body sprites are repeatedly created and destoried.
I look forward to hearing from you.
Does anyone else have any suggestions?
I would very much appreciate it