Life and Death

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Life and Death

Post by woner11 »

Is it possible to do one of or both of the following:
1. Create a series of regions or a single region that heals you up to a certain point and then kills you.
2. Create a region or a series of regions where if you enter it you die, but only if you have full health. If you have anything below that you live.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Life and Death

Post by [RDH]Zerted »

Yes, I believe both are possible, but you will have to state in the lua how much health full health is for each unit class.
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Life and Death

Post by elfie »

also, you could do the healing not only through a region, but through an object's odf properties. that is how the medical droids work.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Life and Death

Post by [RDH]Zerted »

The FakeConsole does its health regeneration by changing the object property: AddHealth
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: Life and Death

Post by woner11 »

What kind of region would I use, or what do I type into the lua. I know how to set up a heal region and a death region, but I don't know how to make so that when you're at full health you die.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Life and Death

Post by [RDH]Zerted »

I don't have the modding resources on this computer. Use a normal regions. When the player enters the region, you want to get its unit health and unit class. Compare the health to the max health for that unit class (you need to define this max health in the lua somewhere). If the two healths match, kill the unit object.
Post Reply