Author Topic: MW: Smoke Mine  (Read 745 times)

Hello, I was working on making a smoke mine. I would like to know how to apply a burn damage function. i am using some of the Landmine's code for the on touch part of it, I just want to know how to change the explosion to a burn. If you can, post it in the landmine script. By the way, All of my topics starting with MW stand for Modern War for my Modern War pack.

Well, This is the part of the code you would want to change under the Landminecol::onCollision part:
Code: [Select]
if(%col.getType() & $TypeMasks::PlayerObjectType && $Landmineset[%obj] == 1)
{
%obj.damage(%col,%obj.getworldboxcenter(),%obj.getdatablock().maxdamage);
$Landmineset[%obj] = 0;
}
Change that to:
Code: [Select]
if(%col.getType() & $TypeMasks::PlayerObjectType && $Landmineset[%obj] == 1)
{
%col.burn(burn time in milliseconds);
$Landmineset[%obj] = 0;
}

Ok, this is what the code looks like at the bottom now. [Updated]

Code: [Select]
if(%col.getType() & $TypeMasks::PlayerObjectType && $Landmineset[%obj] == 1)
{
%col.burn(burn time in milliseconds);
$Mineset[%obj] = 0;
}}
« Last Edit: May 10, 2009, 07:10:46 PM by heedicalking »

Do you want it to hide their feet and make them crouch when they step on it? If you don't get rid of the %col.hidenode things and the %col.playthread thing. And you don't put burn time in milliseconds in the %col.burn(); thing, like if you want them to burn for 5 seconds, you put %col.burn(5000);

1000 milliseconds = 1 second
« Last Edit: May 10, 2009, 07:09:49 PM by AGlass0fMilk »

Do you want it to hide their feet and make them crouch when they step on it? And you don't put burn time in milliseconds in the %col.burn(); thing, like if you want them to burn for 5 seconds, you put %col.burn(5000);

1000 milliseconds = 1 second
Oh, oops, will remove that.
Updated.