Edgarsnorajona Posted May 3, 2013 Posted May 3, 2013 Hello i am trying to spawn an object when a player enters a marker and make it disappear after some seconds. I need to know how to make the object disappear after a few seconds. smoke = createObject ( 2780, -2080.5, 1387.4000244141, 5.1999998092651, 0, 0, 0 ) setTimer ( smoke, 2500, 1, source, true, 2.5) This doesn't seem to work.
DiSaMe Posted May 3, 2013 Posted May 3, 2013 In setTimer, the first argument is the function you want to be called, then goes the time and execution count and further is whatever you want to pass to the called function. So if you want destroyElement(smoke) to be delayed, you have to call setTimer like this: setTimer(destroyElement, 2500, 1, smoke)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now