Growing things :D And "If" thyme
9 posts • Page 1 of 1
Growing things :D And "If" thyme
Hey i need some help. I'd like to make missile, i mean when it's hit it's spawning small circle which is growing. From (for ex.) size= 0.25 to size= 10 and then when it reach size=10 ist disappeared (for ex. by density= 0).
Also i'd like to know something about thyme "If". I have found something like this
"scene.my.x > 10 ? scene.my.y : scene.my.z" and this "onhutbylaser(e)=>{scene.my.x=scene.my.x + 1 ? ...}"
about second i know that is laser hits scene.my.x is growing but when i try to thyme after "?" for ex. {density=0} ist correct it to "scene.my.x=scene.my.x + 1 (?)({density=0}) ???
please explain simple rule of thumb, and soon you will see automatic flying machine of doom

Also i'd like to know something about thyme "If". I have found something like this
"scene.my.x > 10 ? scene.my.y : scene.my.z" and this "onhutbylaser(e)=>{scene.my.x=scene.my.x + 1 ? ...}"
about second i know that is laser hits scene.my.x is growing but when i try to thyme after "?" for ex. {density=0} ist correct it to "scene.my.x=scene.my.x + 1 (?)({density=0}) ???
please explain simple rule of thumb, and soon you will see automatic flying machine of doom
- Somtaaw Kith
- Posts: 5
- Joined: Thu Jul 28, 2011 1:57 pm
Re: Growing things :D And "If" thyme
Not sure of what to do exactly, but the only way of making circles "grow",
is to spawn a circle, delete that, and respawn a bigger one...
as for if scripts,
condition ? {TRUE} : {FALSE}
is to spawn a circle, delete that, and respawn a bigger one...
as for if scripts,
condition ? {TRUE} : {FALSE}
When asking for help, READ THE STICKIES!
- electronicboy
- Posts: 1694
- Joined: Mon Aug 31, 2009 6:18 pm
Re: Growing things :D And "If" thyme
i got about IF... but about growing i saw scene where you fly airplane and shoot missiles when its hit its makeing BOOM effect and "sonic wave" (circle) is growing
- Somtaaw Kith
- Posts: 5
- Joined: Thu Jul 28, 2011 1:57 pm
Re: Growing things :D And "If" thyme
Following code define a function for creating fading away growing tracers:
- Code: Select all
Scene.my.addSmoke := (sPos, sSize, sColor, sTime)=>{geval("scene.addCircle({geomID := 13; pos := " + sPos + "; radius := .1; color := [0,0,0,0]; drawCake := false; collideSet := 0; drawBorder := false; density := {sim.time > " + sim.time + "+" + sTime + " ? 0 : 0.005}}); scene.addPen({pos := " + sPos + "; fadeTime := 0; color := {" + sColor + " - [0,0,0," + sColor(3) + "*(sim.time - " + sim.time + ")/" + sTime + "]}; zdepth = 4; geom=13; size := {2+" + sSize + " * (sim.time - " + sim.time + ")/" + sTime + "}}) ")};
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Growing things :D And "If" thyme
adjust zdepth, density or add vel as you wish...
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Growing things :D And "If" thyme
Holy S**t nice... now i must understand what have u wrote
:D
- Somtaaw Kith
- Posts: 5
- Joined: Thu Jul 28, 2011 1:57 pm
Re: Growing things :D And "If" thyme
Aha. one question more.. how 2 make that missile will change angle of shot i mean missile will respawn with angle for ex. 180 and when i turn missile launcher to difffrent position it will spawn with angle of laucher..
:D
- Somtaaw Kith
- Posts: 5
- Joined: Thu Jul 28, 2011 1:57 pm
Re: Growing things :D And "If" thyme
Please search forum, it's a faq.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
9 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests



