|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Gibbing self into self with limit
Author |
Message |
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
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!
|
Wed Mar 16, 2011 2:28 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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.
|
Wed Mar 16, 2011 2:47 am |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
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?
|
Wed Mar 16, 2011 8:29 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: Gibbing self into self with limit
Yea. Use global variables.
|
Wed Mar 16, 2011 8:49 pm |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
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.
|
Wed Mar 16, 2011 8:51 pm |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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.
|
Thu Mar 17, 2011 2:44 am |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: Gibbing self into self with limit
Yup. Used a table and made it work perfect. Thanks!
|
Thu Mar 17, 2011 8:07 pm |
|
|
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|