Jump to content

script needed to kill and revive npc with a switch


hawklord2

Recommended Posts

hello

im new to scripting and i need a script for a switch that kills a npc and can revive them as wel

my first script to kill a npc by a trigger (activator) linked to an npc works fine but is it possible to do this by switch

and is it possible to revive them once you trigger the switch again???

 

scn testKillSCRIPT

 

; This script will kill its linkedRef

 

ref linkedRef

short doOnce

 

begin OnTriggerEnter Player

if doOnce == 0

set linkedRef to getLinkedRef

if linkedRef == 0

set linkedRef to GetSelf

endif

linkedRef.kill

set doOnce to 1 ;Trigger is only set off one time

endif

End

Link to comment
Share on other sites

i am no scripter but I doubt it is that easy if it is possible because generally in most games when something dies its id will change as it turns into an object rather than an npc. So i suppose if you could find away to change the id dead body into a new npc it may work, or if you make the npc essential so when they die they are only knocked out and will get back up after a while (i don't think you will be able to make them get up on the press of the switch)
Link to comment
Share on other sites

thanks for the replay but i think it is possible .check this page

http://geck.bethsoft.com/index.php/ResurrectActor.

anyhow its also possible to get an npc concussed by a script

and then they ressurect after some time without further script ( may be a lot more easy).but im still in the proces to figure out how to get a working script that does ressurect an npc

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...