Forum Jump :

Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location: Charlotte
Occupation: Ogachi
Age:
In-game name:

 
#1 Posted at 2010-09-06 00:53        
     
So I'm trying to make a mission where throughout the entire mission, oil containers are burning. The question is, how do I start a fire and make it last forever? I have thought of placing a car and using the "this setdamage 100" command and "setpos" to put it in the container, burning, but it would probably spawn outside anyway, and the smoke would fade eventually.


Author Message


Posts: 1118
Rank:


Level: Member PFS

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2010-09-06 01:29        
     
create an init.sqf file with this code in it.

BIS_Effects_Burn=compile preprocessFile "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn.sqf";

then in the objects init put

nul = [this,5,time,false,false] spawn BIS_Effects_Burn; 


You may need to place a function module on the map.

how it works

//nul=[unit,intensity,time,lifecheck,fade] spawn BIS_Effects_Burn
//Unit: the name of the object that the fire will be attached to
//Intensity: the intensity of the fire. Recommended to use values between
//0.8 and 10, higher values may be used if desired though.
//Time: the time that the fire started. use global variable "time". Used to keep effects synced for JIP
//Lifecheck: if this is true then the unit will only burn as long as it is dead (!alive unit).
//Set to false to burn things like buildings and gamelogics

If it doesn't burn forever try changing the first false statement to true.


Advertisement


Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location: Charlotte
Occupation: Ogachi
Age:
In-game name:

 
#3 Posted at 2010-09-06 02:00        
     
# F2kSel : create an init.sqf file with this code in it.

BIS_Effects_Burn=compile preprocessFile "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn.sqf";

then in the objects init put

nul = [this,5,time,false,false] spawn BIS_Effects_Burn; 


You may need to place a function module on the map.
I tried using it with a medic tent, a humvee, and a gamelogic, none worked. The editor gave me no errors so it could obviously find the burn.sqf, just did not put it into action. I also tried tweaking the settings in the unit's init, which also failed. I did also put a function module on the map.


Author Message


Posts: 1118
Rank:


Level: Member PFS

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2010-09-06 02:32        
     
Strange I just copied them back into a fresh mission and it worked first time.

When you save the init script make sure it's not saving it as a txt file that sometimes happens.


If that fails check out this demo I used it to burn a chopper demo the smoke will fade on this one but it should get you going.


Author Message


Posts: 5
Rank:


Level: Member

Country: us
Location: Charlotte
Occupation: Ogachi
Age:
In-game name:

 
#5 Posted at 2010-09-06 03:18        
     
# F2kSel : Strange I just copied them back into a fresh mission and it worked first time.

When you save the init script make sure it's not saving it as a txt file that sometimes happens.


If that fails check out this demo I used it to burn a chopper demo the smoke will fade on this one but it should get you going.
Instead of putting it in an object's init, I put it in a waypoint and had a humvee move there and it worked, I'll improvise with it. Thank you very much for your help F2kSel!
Edit: I got it working perfectly through the use of triggers, thanks again!


Author Message


Posts: 1118
Rank:


Level: Member PFS

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2010-09-06 16:50        
     
Glad you got it sorted, for what it's worth I think to the make functions work as soon as the game starts the init.sqf file should look like this

waitUntil {!isNil "bis_fnc_init"}; 
BIS_Effects_Burn=compile preprocessFile "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn.sqf";

I missed the first part out before as I don't need it due to using the CBA addon that does it for you.

By placing the call code in a waypoint or trigger you in effect also gave the module time to start.






Tags: Burn, Fire, Oil, Smoke