eleglas Posted April 4, 2009 Share Posted April 4, 2009 I'm trying to make a firing range with an NPC that you can kill and you can push a button that will resurrect him; this is my script so far:SCN PrisonerResurrect Ref MyLink5 Begin OnActivate Set MyLink5 to GetLinkedRef if MyLink5 Dead == 1 MyLink5.Resurrect Endif END It doesn't seem to work, can someone help me get it working? Link to comment Share on other sites More sharing options...
Deleted1084753User Posted April 4, 2009 Share Posted April 4, 2009 kk, try this: Create a new custom trigger (I used the Vault112 garage for testing, the trigger for the basement door that sits on the wall, then made a new form id base for it). Place your prisoner in the cell and give him a unique editor reference id (I used PrisonerREF). Now copy/paste these two scripts into the GECK: scn PrisonerResurrectSCRIPT BEGIN GameMode PrisonerREF.GetDead ;checks every frame whether the ref is dead and returns a 1 if it is END Use this script in your NPC. scn PrisonerResurrectTRIGGER BEGIN OnActivate if PrisonerREF.GetDead == 1 ;if GetDead has returned a 1, ie the prisoner has been killed PrisonerREF.Resurrect ;resurrect him endif END Use this in your new trigger form. Now, when you kill him, GetDead will be set to 1, then when you press the trigger on the wall (or wherever) it'll check GetDead, see that it's returning '1', and resurrect the prisoner where he was killed. You could also add a PrisonerREF.MoveTo after the resurrect and add a marker in the GECK to have him moved to after resurrection, so he always reappears in the same location :) Link to comment Share on other sites More sharing options...
eleglas Posted April 4, 2009 Author Share Posted April 4, 2009 Thanks, man! That worked! Your really good at this, thanks. Link to comment Share on other sites More sharing options...
Deleted1084753User Posted April 4, 2009 Share Posted April 4, 2009 Happy to help :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.