SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: Ascertes on May 10, 2018, 08:39:06 PM

Title: Damage Over Time Weapon
Post by: Ascertes on May 10, 2018, 08:39:06 PM
Simple question today. I was wondering if it was possible to have a weapon deal damage over time (think Boba Fett's flamethrower in BF2,) and if so, how to do it. I'm looking to create a unit that can "poison" enemy troops with its rifle.

Thanks in advance for any help!
Title: Re: Damage Over Time Weapon
Post by: Led on May 10, 2018, 08:42:02 PM
I believe so.  Sleepkiller had a poison gas cloud that did something like that, i think.

You should also be able to use a reverse (negative) heal rate.
Title: Re: Damage Over Time Weapon
Post by: Ascertes on May 11, 2018, 11:40:55 AM
Quote from: Led on May 10, 2018, 08:42:02 PM
You should also be able to use a reverse (negative) heal rate.

Is there an example I could look at for what code to insert into the ordnance ODF? I've been looking through the stock assets and haven't found anything pertaining to a negative heal rate so I'm a little in the dark on how to implement this properly.
Title: Re: Damage Over Time Weapon
Post by: Dark_Phantom on May 11, 2018, 11:52:09 AM
As far as a negative heal rate, you should just be able to use:
AddHealth = -20
Lies above, look here. http://www.swbfgamers.com/index.php?topic=6532.msg90906#msg90906

A place that may help you is the stock assets of Polis Massa - using an effect region and losing health.  I think the flamethrower is in the Geonosis: Chain Isle assets, and Sereja has used flamethrowers too I think. 
Title: Re: Damage Over Time Weapon
Post by: Ascertes on May 12, 2018, 01:57:12 PM
Quote from: Dark_Phantom on May 11, 2018, 11:52:09 AM
A place that may help you is the stock assets of Polis Massa - using an effect region and losing health.  I think the flamethrower is in the Geonosis: Chain Isle assets, and Sereja has used flamethrowers too I think. 

Hmm. I'm reading through the ODF's that Sereja provided in the link you sent me but nothing is really sticking out to me as to what specifically controls the duration of the damage. Lifespan seems to stick out, but I think that's the duration the ordnance itself lasts, not the damage.

I also went through the flamethrowers in the BF2 stock files and nothing helped their either. I feel like it should just be a simple 1 line piece of code...
Title: Re: Damage Over Time Weapon
Post by: Giftheck on May 12, 2018, 02:45:07 PM
Damage Over Time doesn't exist in SWBF1 as far as I recall. Sereja's using a similar trick to me: the Flamethrower's ordnance is a modified, invisible grenade with a flame as its trail effect that sticks to targets. When it sticks, it causes damage, then when it 'expires' (or 'explodes') it causes more damage.
Title: Re: Damage Over Time Weapon
Post by: Ascertes on May 14, 2018, 03:30:00 PM
Quote from: Gistech on May 12, 2018, 02:45:07 PM
Damage Over Time doesn't exist in SWBF1 as far as I recall. Sereja's using a similar trick to me: the Flamethrower's ordnance is a modified, invisible grenade with a flame as its trail effect that sticks to targets. When it sticks, it causes damage, then when it 'expires' (or 'explodes') it causes more damage.

I see...that's really disappointing. Back to the drawing board for this class then :|
EhPortal 1.34 © 2024, WebDev