View unanswered posts | View active topics It is currently Thu Dec 26, 2024 6:34 pm



Reply to topic  [ 7 posts ] 
 Gibbing self into self with limit 
Author Message
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: Gibbing self into self with limit
Yea. Use global variables.


Wed Mar 16, 2011 8:49 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Gibbing self into self with limit
Yup.
Used a table and made it work perfect.
Thanks!


Thu Mar 17, 2011 8:07 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.193s | 13 Queries | GZIP : Off ]