slow spawn
9 posts • Page 1 of 1
slow spawn
i am trying to spawn objects but when i do it the object spawns very fast and it makes too many of them. how do i force objects to spawn at a slower rate
- mrmegawarrior
- Posts: 80
- Joined: Wed Aug 25, 2010 6:25 am
Re: slow spawn
This is more about the mechanics then the thyme.
If you're using a laser make the object spawn in the path of the laser to temporarily block it. Or you could use a spinning square and use oncollide so you can fine tune the frequency of collisions.
If you're using a laser make the object spawn in the path of the laser to temporarily block it. Or you could use a spinning square and use oncollide so you can fine tune the frequency of collisions.
-

Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: slow spawn
so there is no way to do it with thyme?
- mrmegawarrior
- Posts: 80
- Joined: Wed Aug 25, 2010 6:25 am
Re: slow spawn
No way that is worth doing.
You could get craft with some timers
viewforum.php?f=13
Look at section 9 and 13.
You could get craft with some timers
viewforum.php?f=13
Look at section 9 and 13.
-

Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: slow spawn
I use this:
IMPORTANTset it's controlller accelerator to zero and it should spawn a circle every second
- Code: Select all
(e)=>{sim.time - e.this.controllerAcc >= 1 ? {scene.addCircle({}); e.this.controllerAcc = sim.time}:{}}
IMPORTANTset it's controlller accelerator to zero and it should spawn a circle every second
-

Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: slow spawn
Or use something like:
- Code: Select all
controllerAcc=controllerAcc+1; controllerAcc>100 ? {Spawn code here; controllerAcc=0}:{};
Phundamentalist
-

davidz40 - Posts: 438
- Joined: Sun Sep 06, 2009 10:30 am
Re: slow spawn
davidz40 wrote:Or use something like:
- Code: Select all
controllerAcc=controllerAcc+1; controllerAcc>100 ? {Spawn code here; controllerAcc=0}:{};
I guess you put this code on the onCollide part of the objects scripting menu
I am still learning, not an expert yet. I'm just here to have some phun.
- InfinityPlayer
- Posts: 40
- Joined: Thu Dec 09, 2010 7:57 pm
9 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests




