Data Realms Fan Forums http://45.55.195.193/ |
|
Gibbing self into self with limit http://45.55.195.193/viewtopic.php?f=73&t=21890 |
Page 1 of 1 |
Author: | Asklar [ Wed Mar 16, 2011 2:28 am ] |
Post subject: | Gibbing self into self with limit |
I want to make some kinda of bunker buster explosive like. My idea is to make an explosive that gibs into itself keeping the speed of the previous explosive, in that way I could create an ascending line of explosives exploding into themselves. If you didn't get the last part it's ok, because now I'll go to the main point. How can I make it gib into self but stopping after some explosions? Is it even possible? Thanks! |
Author: | Grif [ Wed Mar 16, 2011 2:47 am ] |
Post subject: | Re: Gibbing self into self with limit |
It's possible, yes. Basically just search through all the particles in a frame, and then flag all the particles with the presetname of your exponentially-gibbing particles to delete (not gib!) themselves the next frame. If you've got enough of them, you might get a significant enough number that are caught between frames when you run the delete cycle, so I'd run it for a clean half second before declaring your mission accomplished. I used exactly that technique with my Blender, which is somewhere in Mod Releases/on the second page of the Minor Mod Dump. |
Author: | Asklar [ Wed Mar 16, 2011 8:29 pm ] |
Post subject: | Re: Gibbing self into self with limit |
I have a doubt on it, anyway. If I'm using explosives, and they explode into another one, the number of explosives "should" be one. In that case, the code wouldn't work, I suppose, because if I made it count the number of explosives and make it delete them all when the number of them was 3 for example, it would only count 1 explosive because when it gibs it gives into only one explosive. Maybe if I code 3 explosives and make them gib in order and attach a script to every one of those that made them fly upward, that would work better. I suppose. Can I make lua scripts interact with different scripts? |
Author: | Roast Veg [ Wed Mar 16, 2011 8:49 pm ] |
Post subject: | Re: Gibbing self into self with limit |
Yea. Use global variables. |
Author: | Asklar [ Wed Mar 16, 2011 8:51 pm ] |
Post subject: | Re: Gibbing self into self with limit |
Wait a second. Global meant variables that worked at game-scale rather than script scale? Visual Basic surely messed me up. |
Author: | Grif [ Thu Mar 17, 2011 2:44 am ] |
Post subject: | Re: Gibbing self into self with limit |
Yeah... it sounds like you just need a global variable that you increase in the create function of each of the particles. |
Author: | Asklar [ Thu Mar 17, 2011 8:07 pm ] |
Post subject: | Re: Gibbing self into self with limit |
Yup. Used a table and made it work perfect. Thanks! |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |