Home   Help Search Login Register  

Author Topic: overriding the default destroyed vehicle smoke ?  (Read 1172 times)

0 Members and 1 Guest are viewing this topic.

Sanctuary

  • Guest
overriding the default destroyed vehicle smoke ?
« on: 24 Jan 2005, 11:53:18 »
Hello

I require some help with a problem i have.
To enhance a bit my OFP , i am including a simple "burning effect" through editing the main config.

The burning effect is triggered by this in the config, in the vehicles definition :
Quote
      class EventHandlers
         {
         killed="(_this select 0) exec {\neweffects\burning.sqs}";
         };

Then , in my \modfolder\addons\ , i have a neweffects.pbo where i included the following burning.sqs script

Quote
_object = _this
_a=0
#loop

_inten = 0.5 + random 0.5
_intenH = random 0.7

_size1 = [3 + random 2,1 + random 2]
_size2 = [3 + random 2,1 + random 2]

_length = 0.5 + random 0.5
_length2 = 1.5 + random 1.5

_mvel = [random 3 - random 3,random 3 - random 3,6]

;// Loop delay
   ~ 0.12
_a=_a+1
? _a >= 400: exit
drop ["cl_fire","","Billboard",0.01,_length,[0,0,0],_mvel,0,1,1,0,_size1,[[1,1,_intenH,_inten],[1,1,_intenH,_inten],[1,1,_intenH,_inten],[1,1,_intenH,0]],[0,0.7 + random 0.7],0,0,"","",_object]

drop ["cl_basic","","Billboard",0.01,_length2,[0,0,0],_mvel,0,1,1,0,_size2,[[0.05,0.05,0.05,0],[0.1,0.1,0.1,0],[0.1,0.1,0.1,_intenH],[0.1,0.1,0.1,_intenH],[0.1,0.1,0.1,0]],[0,1,0,1],0,0,"","",_object]

goto "loop"

#end
exit
I have not finished to tweak the values yet, but ingame this script works like it should, every destroyed vehicle will have the burning effects without errors popping up.

So what is my problem if all works well ?
The problem is in the default smoke that comes with the vehicle.
When the destroyed vehicle is a BIS model there are no problem (as the smoke appear on top of the vehicle) , the burning effect is very visible.

But and there is my problem, in several addons (i use them to replace BIS models) the smoke is really big and seems to originate from under the vehicle.
And this big smoke is hiding the burning effect under their dark cloud.

This does not come from their own config.cpp, as i delete them to use only a main config (when i replace BIS vehicle by those addons), so i suspect some value included in the addon itself is triggering that damn smoke behaviour that is killing my effect.

So here is my question : is it possible to override the normal smoke effect coming from destroyed vehicle , making it not appear (in the purpose of replacing it with a smoke script that i can control)
I tried several fire/burning script, and all are hidden by those kind of addons too big smoke (actually i noticed this in some Combat addon and inq_M60 by example).

I tried to add in my burning script
Quote
_object setfuel 0
removeallweapons _object
to limit this normal smoke time, but ingame it does not affect all destroyed vehicle (it works for some , the smoke disappear quickly, but for others the smoke remains, it seems to affect vehicle randomly).

Thanks for any help, as i can't find a solution.

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:overriding the default destroyed vehicle smoke ?
« Reply #1 on: 24 Jan 2005, 14:33:04 »
The CBT_addons have some Booleans,to be placed in init.sqs like:

CBT_NoScripts = true

CBT_M113a_NoScripts = true

CBT_smokeOff = true

I think you can find more info in the readme included in the CBT pack.
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Sanctuary

  • Guest
Re:overriding the default destroyed vehicle smoke ?
« Reply #2 on: 24 Jan 2005, 16:57:25 »
Unfortunately it is not the solution

I play with such addons replacing BIS vehicle with their PBO "cleaned"  from files i don't use (sounds, scripts, textures of unused models, models unused like desert variants ..etc )

So there is no Combat smoke scripts that are running (the same for the inq_m60 i use), only the model in .P3D and the corresponding textures are present in the .pbo


Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:overriding the default destroyed vehicle smoke ?
« Reply #3 on: 24 Jan 2005, 18:38:43 »
Hmpf I see,

All I can think of is try to remove all EHs attached to the vehicle,most recent addons have em.

But if all the scripts are gone that they should activate....
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Sanctuary

  • Guest
Re:overriding the default destroyed vehicle smoke ?
« Reply #4 on: 24 Jan 2005, 18:57:55 »
And that is exactly the problem, this smoke originating from "under" the vehicle in those addons is not created by any scripts, (it would have been so easy to control it if it was the case).
I suspect this unusual smoke size and origin is a setting defined in the .p3d .

That is why i hoped someone knew about how to prevent the normal smoke to appear, this way i could create it myself in a script with the drop command.

In the main config, there are cloudlets definition for a lot of things , if i set their size value to 0 , the result ingame willl be deactivated smoke created by gun, coloured smoke of an explosion not appearing etc ...

But no one of those setting control the normal smoke, the one that occurs during +/- a minute when a vehicle is destroyed.

If i could make it to disappear with a change in the config, it would make the unsual smoke of the addons disappearing too, as it is the same one (but just bigger and having its source under the vehicle instead of its top).

But in the main config no one of the cloudlet definition seems to control this specific smoke.

Thanks for trying to help me though, i hope a solution can be found as it is very annoying and until now i found no scripts to do this.


I just hope it is not hardcoded like i begin to fear.
« Last Edit: 24 Jan 2005, 19:00:24 by Sanctuary »

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:overriding the default destroyed vehicle smoke ?
« Reply #5 on: 24 Jan 2005, 20:37:48 »
If I remember well DKM had replaced all the original BIS vehicles with custom smoke\fire...

Maybe take a look how they did it?
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Offline Nemesis6

  • Members
  • *
Re:overriding the default destroyed vehicle smoke ?
« Reply #6 on: 24 Jan 2005, 23:23:18 »
I'm pretty sure the default smoke can't be removed. In fact, I'm curtain. One way you can significantly shorten the time it lasts is by by removing the ammo and/or fuel of the vehicle.


By the way, that's my script! :)
I am actually flying into a star... this is incredible!

Sanctuary

  • Guest
Re:overriding the default destroyed vehicle smoke ?
« Reply #7 on: 24 Jan 2005, 23:49:58 »
And that is a great one , simple and not ressource hungry ;)

Well, i tried several things, used several additional scripts to see what can be done in that area and finally  i think it is really hardcoded or controled by a setting in the .p3d itself.

So i will use , like i said
Quote
_object setfuel 0
removeallweapons _object

It works a bit randomly , as let's say 40% of the burning vehicles will continue to have a long time smoke despite that, but it is the only real solution as it works for the other 60% other vehicles ingame.

Thanks guys for the help, at least i learnt a bit better what was possible or not.
Now back to tweak the drop area of the script itself to have the visual result i want.

Offline Zayfod

  • ECP Team
  • *
  • Llama, softest natural fibre in the world.
Re:overriding the default destroyed vehicle smoke ?
« Reply #8 on: 27 Jan 2005, 00:35:37 »
Code: [Select]
_object setfuel 0
removeallweapons _object

Beware of this code when used in a generic MOD application. It can cause havoc with certain maps where vehicles are repaired and made available again to the player. They will neither drive nor fire again.  ;)

Zay
"I have come here to kick ass and chew bubble gum......an I'm all outta bubble gum!"

Sanctuary

  • Guest
Re:overriding the default destroyed vehicle smoke ?
« Reply #9 on: 27 Jan 2005, 01:27:10 »
Oops, i have not thought about this.

But now that i think more about it, i am happy this situation will happen.
As it should give an important role to the fuel truck and the ammo truck in mission allowing to repair destroyed vehicle, other than their "target of demolition mission" or cutscene "eye candies" usual roles.

Like Bob Ross said,
Quote
There are no mistakes, only happy
accidents
this is a case of a happy accident :)
« Last Edit: 27 Jan 2005, 01:28:17 by Sanctuary »