Jump to content


Photo

Having Script Trouble


  • Please log in to reply
2 replies to this topic

#1 Pyro0623

Pyro0623

    X-S X-perience

  • Members
  • PipPip
  • 400 posts
  • Location:Kelowna, BC Canada
  • Interests:Computers and technology, Xbox moddin', Playin' vids on my xbox.
  • Xbox Version:v1.4
  • 360 version:unknown

Posted 20 January 2006 - 12:37 PM

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?

Edited by Pyro0623, 20 January 2006 - 12:39 PM.


#2 BungaDunga

BungaDunga

    X-S Young Member

  • Members
  • Pip
  • 59 posts

Posted 25 August 2006 - 07:10 AM

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.elderscro...php?showforum=5

#3 turk645

turk645

    X-S Member

  • Members
  • Pip
  • 101 posts
  • Xbox Version:unk
  • 360 version:unknown

Posted 17 September 2006 - 06:22 PM

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?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users