Page 1 of 1
Timers and Spawn help?
Posted:
Fri Oct 15, 2010 9:40 am
by happycrab
I'm trying to make a version of pac-man where a new actor is introduced that wanders around aimlessly and drops "dots". I tried using a timer to make the actor drop every 5 seconds or so but I just cant figure out how to use it. Anyone have any ideas?
Re: Timers and Spawn help?
Posted:
Fri Oct 15, 2010 9:53 am
by skydereign
If you want to use a timer, here is how you would do it.
Create a timer, lets just say spawner
Timer: 5000 ms
Type: Periodic
Min Time: * (default)
Repeat: Forever
Count: * (default)
In the CreateActor event for your new actor, put the CreateTimer code. Then add the timer event that creates the dot actor. If you want a demo I can make one.
Re: Timers and Spawn help?
Posted:
Fri Oct 15, 2010 9:55 am
by happycrab
ill try what you said, i would love a demo if you could make one
but only if you have time haha
Re: Timers and Spawn help?
Posted:
Fri Oct 15, 2010 9:59 am
by happycrab
I can't even figure out how to make a timer
I've tried going to events on the Actor Control but it says I need to make a timer first.
I right click on the Actor and I click new activation event but it just gives me a colorful line that i need to connect to. Lol any ideas on what I am doing wrong?
Re: Timers and Spawn help?
Posted:
Fri Oct 15, 2010 10:03 am
by skydereign
Ah, that would explain why you couldn't get this working. Add the Create Actor Event, then go to Script Editor. When in script, click the [Variables/Functions] button at the bottom, then CreateTimer. The rest should be pretty simple. If you still need help after this I'll make the demo.
-Edit
Well either way here it is.
Re: Timers and Spawn help?
Posted:
Fri Oct 15, 2010 10:17 am
by happycrab
I got it! Thanks You rock! =D