Author Topic: [Solved] Initial Explosions and Final Explosions  (Read 466 times)

I'm working on a vehicle add-on and I only want it to explode once but I can't find any information about it. The vehicle always explodes twice due to these lines in the datablock I assume but changing the explosion projectile or commenting the lines out entirely does nothing to stop them. They seem to default to the jeep explosions if I am correct.

« Last Edit: September 22, 2018, 10:08:22 AM by Dr.Tyler O. »

Post the entire datablock. If you are inheriting from a different datablock it will be using it's default settings

Post the entire datablock. If you are inheriting from a different datablock it will be using it's default settings

Thank you for the reply but it is just a WheeledVehicleData datablock, I'm not inheriting from anything. Posting the contents of my datablock will not benefit this topic.

It's narrowed things down. If you inherit from a subclass of wheeled data like Jeep then commenting out explosion data will just make it choose the default. With this new information you now know that the only solution is to modify the explosion. I suggest creating a new explosion datablock and making it empty and using that as your second explosion

It's narrowed things down. If you inherit from a subclass of wheeled data like Jeep then commenting out explosion data will just make it choose the default. With this new information you now know that the only solution is to modify the explosion. I suggest creating a new explosion datablock and making it empty and using that as your second explosion

I was going to do that originally but I thought that surely there could be a less hacky way. I'll still check back on this topic but I'm going with your solution for now. Thank you

just do this

Code: [Select]
initialExplosionProjectile = "";
this will override the parent and set it to a non existent object so it won't create it
but if you just comment it out it will continue to inherent from the parent

Won't that spam errors every time it explodes


first off
Won't that spam errors every time it explodes
no

I took a look at the source code and the variable will default to something else if you do this
you haven't quite explained what you want very well so I'm just going to assume

the easiest solution that doesnt require you to rewrite vehicle functions would be to just create a projectile that does nothing like so


Code: [Select]
datablock projectileData(emptyProjectile)
{
     lifeTime = 0;
};

then set whatever variable you want to this emptyProjectile and it will create this projectile momentarily (which has no model or explosion)

this is the simplest solution that will work in mostly every circumstance


Edit:
Special thanks to "thegoodperry" for coming up with this idea first
« Last Edit: September 21, 2018, 04:11:15 PM by Swollow »

Hey that's what I said 😤 thx for stealing my patented help idea chump

I didn't bother reading your post since mostly everything you say is dumb as forget, my bad

I didn't bother reading your post since mostly everything you say is dumb as forget, my bad
okay that was unwarranted hostility but ok

okay that was unwarranted hostility but ok
no you kinda deserve it


just do this

Code: [Select]
initialExplosionProjectile = "";
this will override the parent and set it to a non existent object so it won't create it
but if you just comment it out it will continue to inherent from the parent

I knew there had to be an easier way to accomplish this. Thank you very much.

Edit: Oh and no console error messages by the way
« Last Edit: September 22, 2018, 10:11:24 AM by Dr.Tyler O. »