Help - Delete Timer
7 posts • Page 1 of 1
Help - Delete Timer
I know this has been asked many times and theres multiple topics on how to have things deleted after a certain amount of time but...Im trying to make a bomb/cannon thing that is a bunch of circles on one point that, when the fixations are deleted, starts a timer to delete the circles 20 seconds later. The timer needs to initialize once the fixations are broken. Ive looked into the other topics of it but i still dont get it. Help would be appreciated 
-

EMKshadow - Posts: 29
- Joined: Tue Aug 10, 2010 1:47 am
Re: Help - Delete Timer
In Phun or Algodoo?
In algodoo You can make circles very slightly opaque, and put small invisible laserpens on them. Then change their onlaserhit to something like (e)=>{controlleracc=controlleracc+1; controllerAcc>200 ? {density=0}:{} }.
In algodoo You can make circles very slightly opaque, and put small invisible laserpens on them. Then change their onlaserhit to something like (e)=>{controlleracc=controlleracc+1; controllerAcc>200 ? {density=0}:{} }.
Phundamentalist
-

davidz40 - Posts: 438
- Joined: Sun Sep 06, 2009 10:30 am
Re: Help - Delete Timer
Yeah I'm using algodoo. I need of a way to have each "timer" (laser) to start for that particular shell only when I press fire and do the same for the next shell when its in the firing chamber. Is there anyway thats possible or does anyone have any ideas?
-

EMKshadow - Posts: 29
- Joined: Tue Aug 10, 2010 1:47 am
Re: Help - Delete Timer
I am just guessing, but if you had a laser from the barrel of the gun, spawning a timer laser on the place where the cartridge is, then it could work. I have no clue what that scripting is.
-

ducky21 - Posts: 301
- Joined: Tue Aug 03, 2010 8:58 pm
Re: Help - Delete Timer
i don't think so because i have about 128-256 circles on each shell and i'm not sure if the laser would hit all of them or just one. Plus if it did spawn a laser for each circle, would it attach the laser to the circle it's supposed to attach to or all attach to a random circle. Boggles my mind 
-

EMKshadow - Posts: 29
- Joined: Tue Aug 10, 2010 1:47 am
Re: Help - Delete Timer
I meant one laser for each circle spawned. Spawning a laser attaches it to whatever was spawned immediately before, there shouldn't be any problems.
Just make
(e)=>{scene.addcircle({pos:=e.pos; radius:=1; color:=[1,1,1,0.99]; onlaserhit=(e)=>{controllerAcc=controllerAcc-0.1; controllerAcc<0 ? {density=0}:{};}}); scene.addlaserpen({pos=e.pos+[0.1,0.1];fadedist:=1;});}
Just make
(e)=>{scene.addcircle({pos:=e.pos; radius:=1; color:=[1,1,1,0.99]; onlaserhit=(e)=>{controllerAcc=controllerAcc-0.1; controllerAcc<0 ? {density=0}:{};}}); scene.addlaserpen({pos=e.pos+[0.1,0.1];fadedist:=1;});}
Phundamentalist
-

davidz40 - Posts: 438
- Joined: Sun Sep 06, 2009 10:30 am
Re: Help - Delete Timer
Since I didnt completely understand what you tried to explain i'll assume you think i'm making something that spawns a bunch of circles on impacts so i'll give you more details and whatever.
Anyways, the circles aren't spawned. If they were, this project would've been done weeks ago. Each shell consists of a box that collides with b and i make a circle with a fixate to it and just clone the circle over and over again until i feel i have enough(they collide with a). When i press enter, a laser that collides with b destroys the box and the circles essentially explode(i have them explode in barrel so its like a flak cannon) And ill make a reload system to load the next shell. Hope i assume right!
PS the code is either faulty or im not implementing it right
Anyways, the circles aren't spawned. If they were, this project would've been done weeks ago. Each shell consists of a box that collides with b and i make a circle with a fixate to it and just clone the circle over and over again until i feel i have enough(they collide with a). When i press enter, a laser that collides with b destroys the box and the circles essentially explode(i have them explode in barrel so its like a flak cannon) And ill make a reload system to load the next shell. Hope i assume right!
PS the code is either faulty or im not implementing it right
-

EMKshadow - Posts: 29
- Joined: Tue Aug 10, 2010 1:47 am
7 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests



