Help - Search - Members - Calendar
Full Version: Having Script Trouble
Scenyx Entertainment Community > Xbox1 Forums > Xbox Game Forums > Game Hacking > Morrowind
Pyro0623
I am trying to make a small mod to revive my companion when she dies( she is super weak and always gets beat down in 1 or 2 hits). I was thinking just a simple scripted ring she can wear with somthing like:
CODE
Begin revive

Short Ondeath

If ( Ondeath == 1 )
    Resurrect        
endif

End revive


But to my dismay, it does not work. it compiles fine, The CS doesn't bitch about anything, but nothing happens ingame when i test it.
so can someone debug my script for me, since i have no idea what i'm looking for?
BungaDunga
Unfortunately, this isn't going to work as it is set up. If a script is on the ring, all commands will run on it, not the wearer! A ring can't die, so nothing will happen. Also, I am unsure whether scripts run on objects in inventories anyway. Even if it did run on the NPC you want, it would suffer from a flaw: Resurrection resets NPC's inventories.

I would suggest you put the script on the NPC herself, and instead of resurrection check for low health and then bump it up. Try this:

CODE

begin revive_new
short doOnce

if ( doOnce == 0 )
   set doOnce to 1
endif

if (  GetHealthRatio < 1 )
   ModCurrentHealth, 10000;This will not go over max health
endif
end


If you can't put the script on the NPC, use a global script instead; set it to be a startscript.

CODE

begin revive_glob
short doOnce

if ( doOnce == 0 )
   set doOnce to 1
endif

if ( "MyCompanionID"->GetHealthRatio < 1 )
   "MyCompanionID"->ModCurrentHealth, 10000;This will not go over max health
endif
end

Either of the above should work. If you want to get into scripting I suggest you check out the official forums, there are some capable modders hanging around:

http://www.elderscrolls.com/forums/index.php?showforum=5
turk645
couldnt you just do an on equip script and make it so it permanatly sets the wearer's health to 5000, thus giving them invincability?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.