lucky you, i just connect myself. Here what i know:
Sup.setTimeout(1000ms,Nameofthefunction) // Wait and then call a function Sup.setInterval(1000ms,Nameofthefunction) // Wait and then call a function every 1000ms => use clearIntervall for end it (for timeout too)
And here a tips :
Use a local funtion, like that you can call it while the var it use are not deletes
function (Enemie: Actor[]){ let idE = 0 function KillEnemie() // the local one { Actor[idE].destroy() idE++ Sup.setTimeout(1000ms,KillEnemie) } }with love, me.
Hey, for some reason, it's not resetting the platform at all! Here's the code, lemme know if i used it wrong.
if (this.actor.arcadeBody2D.getTouches().top)
{
this.actor.arcadeBody2D.setCustomGravityY(-0.01)
Sup.setTimeout(1000, returnPlatform)
}
function returnPlatform()
{
this.actor.arcadeBody2D.setCustomGravityY(0)
this.actor.setPosition(this.pos)
Sup.clearTimeout(0)
}