Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Setting minimal health?

Page: 1 of 1
 GeorgNihilus
01-17-2010, 9:05 PM
#1
Hi :) now I'm trying to use this in TSL to reduce the PC current health to only 7 hitpoints, but he's dying ... even firing that a_min_one_hp in-game script before in the dialog ... here's the script:

void main() {
object oVictim = GetFirstPC();
int nDamage = GetCurrentHitPoints(GetFirstPC());
int nRests = 7;
int nAplidam = nDamage-nRests;
effect eOuch = EffectDamage(nAplidam);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eOuch, oVictim);
}

what's wrong?? :confused:

oh by the way, PC is alone in party for this script
Page: 1 of 1