Discord
Login
Community
DARK THEME

Make a wait time before something happens

I have no idea how to make a sprite wait a certain amount of time before it dissapears, so could someone help me?

Actor = class

wait5sec = function() 
  after 5 seconds do
    this.visible = false
  end
end

end

When the sprite is about to disappear, you call out

 actor = new Actor()
 actor.wait5sec()

thank you!

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community