SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF2 Modding => Topic started by: Anyder on November 18, 2014, 01:00:27 PM

Title: Lua questions
Post by: Anyder on November 18, 2014, 01:00:27 PM
Does anyone know what is this for ?

SetProperty("whatwever", "CurHealth", *A number goes here*) ?
I know about MaxHealth, AddHealth, .. but what is this for ?
Title: Re: Lua question
Post by: Ultimo on November 18, 2014, 01:43:26 PM
Looks like it's going to be your current health whenever you aren't taking damage or etc.
I'd assume it's static, and the value changes depending on if you recieve more health or take damage.

Perhaps if you were to set a game with a high max health, you could spawn everything in at a lower health than max.

Example: Max Health 3000, Current Health 1500; All troops spawn at 1500 and can gain or lose health.
The value must have to differ constantly assuming, well I'm sure you understand now.

*All this is just a theory of mine. I'm not a modder, yet! Ha
Title: Re: Lua question
Post by: Anyder on November 18, 2014, 01:48:17 PM
Quote from: ևltimσ on November 18, 2014, 01:43:26 PM
Looks like it's going to be your current health whenever you aren't taking damage or etc.
I'd assume it's static, and the value changes depending on if you recieve more health or take damage.

Perhaps if you were to set a game with a high max health, you could spawn everything in at a lower health than max.

Example: Max Health 3000, Current Health 1500; All troops spawn at 1500 and can gain or lose health.
The value must have to differ constantly assuming, well I'm sure you understand now.

*All this is just a theory of mine. I'm not a modder, yet! Ha

Yeah I see that theory of urs, however talking with some more people it might be current health but we dont know what it is for yet.

I'll try it once I finish with my fairsides anyway :)
Title: Re: Lua questions
Post by: Anyder on November 21, 2014, 06:16:36 PM
After a test I just made, it looks like the CurHealth thing wasn't for whenever u spawn.

AutoHealing worked (and maxhealth idk, cause i've set the same health the sniper had)

This is how the lua looks

     SetClassProperty("imp_inf_sniper", "MaxHealth", 300.0)
     SetClassProperty("imp_inf_sniper", "CurHealth", 200.0)
     SetClassProperty("imp_inf_sniper", "AddHealth", 10.0)
     
     SetSpawnDelay(1.0, 0.25)
     ReadDataFile("mus\\mus1.lvl", "mus1_ctf")
     SetDenseEnvironment("false")
     --SetStayInTurrets(1)
   SetMaxFlyHeight(840000000)
    SetMaxPlayerFlyHeight(8400000000)
EhPortal 1.34 © 2024, WebDev