OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Bluelikeu on 01 Jul 2005, 00:58:24

Title: Flaming Shards from Veh.
Post by: Bluelikeu on 01 Jul 2005, 00:58:24
Hey all,
Just another script I made.

It requires an add-on which i made, and it is also included in the file.

It basically propells metal shards through the air, when the targeted object is destroyed. I'm hoping to make some modifications to the script, such as sound for the flaming shards, and some splash sounds for when the object hits the ground. Also, I want it to do damage to nearby people.

Sorry I can't talk much right now, I'll fill you in with extra details later, in the mean time, try the script, I think you'll like it.

PS: Please do not change any of the settings for the script in the example mission until after you tried it. I want to hear comments about the current specifications that i selected for everyone.

Also, sorry about having an add-on but i could not fine a better metal piece.

Also, it doesn't cause any lag on my computer, but i recently got a graphics card update, so please fill me in.

Shoot, gotta go, my parents are mad because i'm still using the compter and its 3 AM.

Enjoy, and thanks,
Bluelikeu
Title: Re:Flaming Shards from Veh.
Post by: penguinman on 01 Jul 2005, 14:29:09
lol, this sounds great i wish i could test it, but im out of country and dont have ofp w/ me :'(
 il have to wait a few days
Title: Re:Flaming Shards from Veh.
Post by: Bluelikeu on 01 Jul 2005, 16:40:11
Aww, shulks!

It looks really nice on my computer, expecially when it is used with a plane. The plane crashes and then there's these flaming shards flying above it. If anyone's played C&C Generals, you would know what i'm talking about. 'Course, it doesn't look like that exactly, but similar.

Anyway, back to the script. I've got many plans for it, splash sounds, explosion sounds, and metal that damages people.

I also wanted to create some variation between what metal pieces are propelled, I just need to create some more metal pieces. If you get a good look at the metal, it looks like the fuel from a tank exploded into it(texture wise) don't ask how I got this texture. :D

I know that this question is going to come up sooner, or later so might as well answer it now

Are you sure that metal burns, and that these pieces fly so high?

Yes I am, the fuel from the vehicle commonly explodes inside the vehicle which causes the metal to splinter and shard off. If anyone has any chemisty experience they would know that chemical fires such that of fuel does in-fact spread on any surface because the chemicals themselves are splattered all over it, and the fuel will burn until it is all burnt up.

On the point of the pieces flying so high. Chemistry is also involved. The force of the explosion in the fuel tank litterally strips the metal off the vehicle, not to mension the parts inside the vehicle that are blown away.

On the side of the script, I would like to add more customizing abilities. One would be to allow the person to set how much force the explosion will cause, which will directly affect the hight that the shards will fly. Two would be that one could set there to be no fire on the shards, and will instead be "just metal."

I'll get back with more,
Thanks,
Bluelikeu
Title: Re:Flaming Shards from Veh.
Post by: Garcia on 01 Jul 2005, 17:33:30
1) The metal pieces is taken by the wind...like, if the wind goes east, the metal pieces is taken by the wind while in air, and go east...metal is heavy, so this wouldn't happen in real life...these pieces move like 5-10 m to the side if they go high...

2) The fire, while on ground, is a bit silly...I dunno if it's the wind, but when I tested it, the fire went in the same direction as the wind. And I mean, the fire was like 0.4 up in the air and 4 m to the side...should go more up and less to the side ;)

3) Veeeery bad that you gotta use a addon :-\If it's possible, could you at least try to add a script that doesn't use the addon?

Else, it was quite nice :)
Title: Re:Flaming Shards from Veh.
Post by: Planck on 01 Jul 2005, 19:30:37
There are shrapnel models in the Data3d.pbo that you could use instead of making another addon.


kusplechu.p3d     classname  "FxExploArmor1"            
kusplechu2.p3d   classname  "FxExploArmor2"

There is also   kusplechu3.p3d  but it has no classname.


Planck    
Title: Re:Flaming Shards from Veh.
Post by: Bluelikeu on 01 Jul 2005, 19:45:10
@Planck
Thanks, I'll change the object for the next update.

@Garcia
1. Btw, the metal does move with the air. Its called air friction. And yes, the air can move them quite a distance since the shrapnel has quite a bit of surface area. Even though weight is a factor, the object does move. It's not like I'm launching a piano into the air, or an elephant for that matter.

2. Fire moves with the wind, thats why fire spreads so easily. Also, the effects part of OFP is, well, crap, I'm not sure how I could do it any better. If the fire would just burn straight up, that would mean that there is no wind and therefore look a bit odd. Any way to make it look a bit more real?.

3. You don't accually have to use the add-on, given with the script. The script, when initiallized, has the option to change the type of object created, since i suspected in advance that people wouldn't like the add-on. However, I put the script in the add-on because it's more organized for me + its not done yet. In the future i will be distributing an add-on to go with the script because i want some good sounds to go with it. So the script will essentially require an add-on.

Also, Why is everyone wrapped up in the idea that add-ons are bad? Every single object you have in the game is an add-on. I think that people are missing the entire point about OFP modding.

Thanks,
Bluelikeu

Edit:
@Garcia
Just re-checked the script, and the wind does not really affect the shards. The shards are forced into the air and to the sides because because of the "simulated" explosion.
Title: Re:Flaming Shards from Veh.
Post by: Bluelikeu on 01 Jul 2005, 20:21:39
ok, there appeared to be some sort of flickering black particals that would appear randomly. Those have been removed and fixed
Title: Re:Flaming Shards from Veh.
Post by: Garcia on 01 Jul 2005, 23:13:17
1) I know they will be affected by the wind, but it really looked a bit much...but if it ain't the wind, there's no problem ;)

2) I know the fire also is affected by the wind, but the fire goes horisontal...you should try to make it go more to up...of course not straight up, as that would look silly too...though I know shit about the drop command or whatever you gotta use for that :-\

3) The problem ain't addons, it's small addons :-\ I don't like using addons that's on like 100 kb...cause if everyone used small addons for scripts there would be soooo many small addons to use :-\ Though, it all depends on the script and the addon...if the addon is a must (like editorsupgrade), there's no problem...but the less addons a mission needs, the better it is for the player ;) Btw, you don't need to make a addon for the sound, you can just add them to the mission :)
Title: Re:Flaming Shards from Veh.
Post by: Bluelikeu on 01 Jul 2005, 23:22:02
Alright, I'll get on trying to make the smoke appear to go more upwards, maybe a little less lifetime for the particals. However, It might look a bit glitchy. Those who have read my script and understood the burning section would understand. The script flips through an array of the shrapnel and creates the fire on them. The good thing about that is that it makes it impossible for the script to take up more of the CPU than it should. The down side is that it causes a glitchy feeling sometimes.

I see your point on the add-ons, however, it seems to be more organized if someone wanted to transfer the scripts and the sounds, all they would need to do is, well, nothing, just start another mission with the script activated.

Thanks,
Bluelikeu
Title: Re:Flaming Shards from Veh.
Post by: Garcia on 02 Jul 2005, 15:42:19
hmm...oook...tried with the FxExploArmor2 instead of your metal piece, and it looks just as good, except the pieces are removed once they hit the ground :(
Title: Re:Flaming Shards from Veh.
Post by: Bluelikeu on 02 Jul 2005, 16:10:17
they would have to be in the air for about 15 seconds before they are deleted.

ok, just tested it. The object is deleted by OFP not my script. The other possibility is that they are not delted and just sink into the ground so so that the fire does not appear. Looks like I won't be using those p3ds. 'Course some people like it that the fire does not appear on the ground, so i'll make a separate script for that.

ok, just tested it again. When i change the objects, from the .p3d given by Planck to my .p3d, the script resumes normally. Therefore, it seems to only be the shards given to us by OFP. On top of that, the shards from OFP fly out like rockets, i'll stick with my add-on for now.

Shoot, once again, i forget to mention how to initialize the script.

[object to use, p3d to create as a shard, number of shards, distance around object to create shards, loop time(this number should be really low eg. 0.0000000001), seconds before deleting the shards]exec"\blu_met_shrds\scrap.sqs"

This should at least help some people, or confuse them.

Thanks,
Bluelikeu
Title: Re:Flaming Shards from Veh.
Post by: Garcia on 02 Jul 2005, 19:41:01
Yea, I meant that the OFP shards where deleted once they hit the ground...which sucks :(
Title: Re:Flaming Shards from Veh.
Post by: Pilot on 11 Jul 2005, 18:07:48
I'll give a more in-depth review later, but to adjust the fire so it doesn't fly horizontally, change the rubbing value to .3 or .4.  The fire will still be affected by the wind, but not as much.

-Student Pilot
Title: Re:Flaming Shards from Veh.
Post by: The-Architect on 16 Aug 2005, 10:40:41
I like the script and I'm going to use it in my Afghan mission.

The only grip I have is that there is an awful lot of fire for such little objects. Also the fire seems to flash whilst it's going through the air.
Title: Re:Flaming Shards from Veh.
Post by: Bluelikeu on 16 Aug 2005, 16:34:47
Hmm, the script was made so that it saved the CPU time from having to execute a fire script for each of the shards; the flickering effect was the result of that. Perhaps the flickering effect can also be a plus since the fire really shouldn't be constant while its flying through the air. The fire sort of dims a bit then shoots back up out of the metal piece.

Maybe I should create another script that handles each shard individually instead of collectively in order to remove this flicker effect.

Thanks,
Bluelikeu
Title: Re:Flaming Shards from Veh.
Post by: The-Architect on 17 Aug 2005, 11:48:56
The flickering isn't really a problem. The size of the fire is the oddest thing. Maybe half that size would look better.
Title: Re:Flaming Shards from Veh.
Post by: Bluelikeu on 17 Aug 2005, 14:38:17
Oops, forgot to talk about that point. I'll fix the script so that the average fire volume can be changed via the script's init.

Thanks,
Bluelikeu