Timers and Spawn help?

Game Editor comments and discussion.

Timers and Spawn help?

Postby happycrab » Fri Oct 15, 2010 9:40 am

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?
~Meow~
User avatar
happycrab
 
Posts: 16
Joined: Fri Oct 15, 2010 3:48 am
Location: USA
Score: 0 Give a positive score

Re: Timers and Spawn help?

Postby skydereign » Fri Oct 15, 2010 9:53 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Timers and Spawn help?

Postby happycrab » Fri Oct 15, 2010 9:55 am

ill try what you said, i would love a demo if you could make one :) but only if you have time haha
~Meow~
User avatar
happycrab
 
Posts: 16
Joined: Fri Oct 15, 2010 3:48 am
Location: USA
Score: 0 Give a positive score

Re: Timers and Spawn help?

Postby happycrab » Fri Oct 15, 2010 9:59 am

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?
~Meow~
User avatar
happycrab
 
Posts: 16
Joined: Fri Oct 15, 2010 3:48 am
Location: USA
Score: 0 Give a positive score

Re: Timers and Spawn help?

Postby skydereign » Fri Oct 15, 2010 10:03 am

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.
Attachments
timer.zip
(1.21 KiB) Downloaded 184 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Timers and Spawn help?

Postby happycrab » Fri Oct 15, 2010 10:17 am

I got it! Thanks You rock! =D
~Meow~
User avatar
happycrab
 
Posts: 16
Joined: Fri Oct 15, 2010 3:48 am
Location: USA
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron