AUTHOR - Halloween4.
CATEGORY - Max Payne Scripting.
TUTORIAL - How to make fire permanently damaging.
s
s
s
Make 2 triggers, one called P_Fire_Damage (a player collision trigger), & one called C_Fire_Damage (yes you gessed it, a character collision trigger). I then made 2 custom strings for each trigger one called STOP & one called (you gessed it again), START . Then on state specific, under START on both triggers I put something like this->P_CreateProjectile(damage_fire_4x4, 100); that gives out damage to a player or character when they walk onto the trigger.
Then make a trigger called Explosion, I used a projectile trigger, because in my case I wanted an explosion & fire to be caused by a bullet hitting a gas tank, although you can use other types of triggers also, & you don't have to have a trigger to start a fire you can script one to activate when you start a level, like the open fire in Max Paynes house at the start of Max Payne.
Under this triggers startup tag I put:
this->T_Enable(false); This turns off the trigger until activated.
Then Under this triggers OnActivation tag I put:
this->PS_StartEffect (explosion_gasoline_huge, "");
this->A_Play3DSound(dynamic, explosion_large, "");
this->PS_StartEffect(fire_extra_large, "");
this->A_Play3DSound(dynamic, fire_large_loop, "");
this->P_CreateProjectile(damage_mine, 10);
parent::P_Fire_Damage->FSM_Switch(start);
parent::C_Fire_Damage->FSM_Switch(start);
this->T_Enable(false);
I won't explain all these lines, as you should be able to work out what they do. I will however draw your attention to the last 3 lines.
The 2 lines starting with the word parent point to & start the 2 triggers you just made previously ( & do make them before this trigger or you won't be able to reffer to them by this tigger). These 2 other triggers are placed over the same amount of area where your fire will be, so ajust the radious on both to fit.
Now when the explosion starts it also starts these 2 other tiggers so when you walk into the fire your actualy walking onto & activating a trigger that amits damage.
You can also ajust the amount of damage the triggers emmit by using the CreateProjectile damage lines (the number on the end is the amount of damage caused), & in this way you can have the trigger kill or just injure.
A last word on the last line this->T_Enable(false); this line is vital because if it's not there then the damage emitted by this same trigger will set it off again & again giving you a everlasting Explosion loop,as this is a projectile collision trigger remember.
Good Luck with this: Halloween4
s