Deleted2746547User Posted July 3, 2013 Share Posted July 3, 2013 Wondering if someone can help me figure out what I need to fix in my script to make it work right...What it is SUPPOSED to do is if you use the REVIVER Syringe on a companion or other NPC in an effort to "resurrect" them ... there are a few possible outcomes. 1. There is a rare chance that they will be replaced by a zombie. 2. It brings them back (resurrects them) and all is well and good. 3. It has no effect (and you could theoretically keep trying with more shots).What seems to happen is that the shot is able to be equipped but when you inject a dead NPC... nothing at all happens.ANY SUGGESTIONS?***Once I finish this I still need to work on the infection script (if the zombie gets away from you and/or bites someone else.) scn BlackbriarReviverScript short sRand ref rTarget begin Gamemode set rTarget to player.GetCombatTarget Set sRand to GetRandomPercent If player.IsSneaking==1 && rTarget.Getdead && player.getitemcount BlackbriaReviver >= 1 && sRand >= 10 playsound NPCHumanUsingPsycho rTarget.Disable rTarget.PlaceAtMe BlackbriarZombieLevel4 player.removeItem BlackbriaReviver 1 player.additem BlackbriaReviverEMPTY 1 elseif player.IsSneaking==1 && rTarget.Getdead && player.getitemcount BlackbriaReviver >= 1 playsound NPCHumanUsingPsycho rTarget.Resurrect player.removeItem BlackbriaReviver 1 player.additem BlackbriaReviverEMPTY 1 endIf end Link to comment Share on other sites More sharing options...
DaemonGrin Posted July 3, 2013 Share Posted July 3, 2013 I'm not to experienced with scripting but the first thing I notice (if it's on purpose my mistake) a lot of the BlackBriarReviver tags are missing an R in Briar? Geoff Link to comment Share on other sites More sharing options...
jazzisparis Posted July 3, 2013 Share Posted July 3, 2013 Is that a quest script that is supposed to run continuously in game mode? It's not very clear how you intend to handle the injecting part. From what I gather reading your script, it is triggered automatically (and uncontrollably) when the conditions are met. This is the sort of thing you would want to have full control of. You can set a hotkey or a key combination to trigger it. GetCombatTarget only works on live actors. You should use GetCrosshairRef, instead (NVSE function). There is a rare chance that they will be replaced by a zombie.Notice that sRand >= 10 means there's exactly 90% chance the body will be turned into a zombie. You probably meant sRand < 10. I revised your script a little, to demonstrate how you can use a key-press trigger: scn BlackbriarReviverScript short bKeyTrigger ref rTarget begin Gamemode if bKeyTrigger != (IsKeyPressed 54 && IsKeyPressed 14) ; (Right-SHIFT + BACKSPACE) set bKeyTrigger to (bKeyTrigger == 0) if bKeyTrigger set rTarget to GetCrosshairRef if rTarget.IsActor && rTarget.GetDead && player.GetItemCount BlackbriaReviver PlaySound NPCHumanUsingPsycho player.RemoveItem BlackbriaReviver 1 player.AddItem BlackbriaReviverEMPTY 1 if GetRandomPercent < 10 rTarget.PlaceAtMe BlackbriarZombieLevel4 rTarget.Disable rTarget.MarkForDelete else rTarget.Resurrect endif endif endif endif end Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 6, 2013 Author Share Posted July 6, 2013 Is that a quest script that is supposed to run continuously in game mode? It's not very clear how you intend to handle the injecting part. From what I gather reading your script, it is triggered automatically (and uncontrollably) when the conditions are met. This is the sort of thing you would want to have full control of. You can set a hotkey or a key combination to trigger it. GetCombatTarget only works on live actors. You should use GetCrosshairRef, instead (NVSE function). There is a rare chance that they will be replaced by a zombie.Notice that sRand >= 10 means there's exactly 90% chance the body will be turned into a zombie. You probably meant sRand < 10. I revised your script a little, to demonstrate how you can use a key-press trigger: scn BlackbriarReviverScript short bKeyTrigger ref rTarget begin Gamemode if bKeyTrigger != (IsKeyPressed 54 && IsKeyPressed 14) ; (Right-SHIFT + BACKSPACE) set bKeyTrigger to (bKeyTrigger == 0) if bKeyTrigger set rTarget to GetCrosshairRef if rTarget.IsActor && rTarget.GetDead && player.GetItemCount BlackbriaReviver PlaySound NPCHumanUsingPsycho player.RemoveItem BlackbriaReviver 1 player.AddItem BlackbriaReviverEMPTY 1 if GetRandomPercent < 10 rTarget.PlaceAtMe BlackbriarZombieLevel4 rTarget.Disable rTarget.MarkForDelete else rTarget.Resurrect endif endif endif endif end You rock... there are three other attached related scripts but I'm having a devil of a time making it work, The purpose of the "Reviver" item would be you as a player could inject (I think I have it as a Misc item in Geck) any dead npc with it.... And the variables above (chance to heal, zombie,etc.) I still have to fix the zombie script that would let anyone turned into a zombie by it go out and infect others.... It's kind of a fun side mission/aspect to my mod. :) You are right about the zombie 10% chance - my bad. MANY MANY MANY thanks for your feedback. Let me go back in and see if i can get this to work. Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 6, 2013 Author Share Posted July 6, 2013 One Question... with GeckPowerUp I get an error: Syntax error. Unknown command 'iskeypressed' ? Any ideas? Link to comment Share on other sites More sharing options...
devinpatterson Posted July 6, 2013 Share Posted July 6, 2013 One Question... with GeckPowerUp I get an error: Syntax error. Unknown command 'iskeypressed' ? Any ideas? Is NVSE loaded? Because that's not a vanilla function. Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 6, 2013 Author Share Posted July 6, 2013 One Question... with GeckPowerUp I get an error: Syntax error. Unknown command 'iskeypressed' ? Any ideas?Is NVSE loaded? Because that's not a vanilla function. yes, i have NVSE loaded.. at least for FNV. HEY! How have you been??? haven't talked to you in forever..... Link to comment Share on other sites More sharing options...
jazzisparis Posted July 6, 2013 Share Posted July 6, 2013 You need to launch the GECK via the NVSE launcher (by creating a shortcut). You can find more details on this page (the last paragraph under 'Installation' section). Link to comment Share on other sites More sharing options...
devinpatterson Posted July 6, 2013 Share Posted July 6, 2013 (edited) yes, i have NVSE loaded.. at least for FNV. HEY! How have you been??? haven't talked to you in forever.....Good to talk to you brother, yeah I just recently started modding again after a long hiatus. Good to see Blackbriar/Restoration movment is kicking butt. If I ever get a chance to play, I'll definitely try it out. But to expand on what Jazziparis and I are saying is that the geck has to have NVSE enabled so it can be aware of NVSE's new functions. This is my shortcut; "XXX\nvse_loader.exe" -editor Where XXX is usually "C:\Program Files\Steam\steamapps\common\fallout new vegas" (unless you'v gone through the trouble of moving your steam directory). Edited July 6, 2013 by devinpatterson Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 7, 2013 Author Share Posted July 7, 2013 yes, i have NVSE loaded.. at least for FNV. HEY! How have you been??? haven't talked to you in forever.....Good to talk to you brother, yeah I just recently started modding again after a long hiatus. Good to see Blackbriar/Restoration movment is kicking butt. If I ever get a chance to play, I'll definitely try it out. But to expand on what Jazziparis and I are saying is that the geck has to have NVSE enabled so it can be aware of NVSE's new functions. This is my shortcut; "XXX\nvse_loader.exe" -editor Where XXX is usually "C:\Program Files\Steam\steamapps\common\fallout new vegas" (unless you'v gone through the trouble of moving your steam directory). Question... how does that work with POWERUP launching? GREAT to see you again! @JazzisParis - THANK YOU! I'm trying to post a major update by tomorrow and get as many bugs, scripts, features fixed as I can before posting.. I've redone a lot... and added a lot of new items. Still, a longgggggg way to go before it's done. You know, like I mentioned awhile ago.... I wish I "got" scripting like you all do. So much more I could do with this mod. A SIDE Question while I have you... I'm having the faction (US) weapons use ammo - is there an easy way to have them "resupply" from a central container when they run out? Anyway, let me try y'alls suggestions and see if I can get this to work.... Link to comment Share on other sites More sharing options...
Recommended Posts