Page 1 of 1

Life and Death

Posted: Mon Mar 10, 2008 1:32 am
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.

Re: Life and Death

Posted: Mon Mar 10, 2008 3:26 am
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.

Re: Life and Death

Posted: Mon Mar 10, 2008 4:24 pm
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.

Re: Life and Death

Posted: Mon Mar 10, 2008 5:24 pm
by [RDH]Zerted
The FakeConsole does its health regeneration by changing the object property: AddHealth

Re: Life and Death

Posted: Mon Mar 10, 2008 10:40 pm
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.

Re: Life and Death

Posted: Tue Mar 11, 2008 1:05 pm
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.