[SOLVED] Magikoopa Abilitys Help Needed

I made this enemy that I would like it to teleport randomly in the area and I searched for ways to make it teleport like a magikoopa from Mario, I have not found anything, please help.

Run a disappear animation, set the enemy’s position to a random spot, and run the appearing animation (or disappearing in reverse).

I tried what you suggested it some what worked but it teleport all over the place, how do I slow it down?

Add a timer, and only teleport when the timer reaches a set interval. Remember to reset the timer at this point, or it’ll go nuts after the first teleport like it does now.

How do I make the timer reset?

If you click on the “Add action” part in the event editor, and type in “Timer” in the search bar at the top of the pop up window, you’ll see a load of options. One of them is “Start (or reset) a timer”.

Also, Check this page on timers in the GDevelop wiki.

It somewhat works but if I put the reset timer for the 20 sec then the animation just gets stuck and if I don’t add it the thing teleport’s after each time the animation ends and the appear animation is not working.

Can you provide a screen shot of the code you’ve got? It sounds like something may not be quite right.


Does it need the repeater?

No, it does not need the repeater. If you want the teleporting to happen 20 times, then you need to use a variable to keep track of how many times the teleport has been activated.

The problem is that the TheMagicGhost timers "Disappear, "“Appear” and “Normal” (and possibly the "Teleport) "timers don’t get started at any stage. You do reset them, but in events that will never be triggered, because the timers that are in the conditions for those reset actions are never started.

You need something like this:

I tried what you suggested and it would just teleport right after the animation (Disappear) and it did not play the Reappear animation.

It works thank you for your help and Beanmatt for correcting me.