ciakko Posted February 14, 2011 Share Posted February 14, 2011 Hi, I need help to complete my mod. I have a dead NPC, I would resuscitate him interacting with his body, using for example a potion on him.I wish that when I interact with the dead body appears a message like: Do you want to use the potion "resurrection"?Can someone give me an example script?Thanks Link to comment Share on other sites More sharing options...
David Brasher Posted February 14, 2011 Share Posted February 14, 2011 I haven't tested and debugged this script, but it would run a bit like this: SCN AACIDeadNPCScript ; Object script Applied to the Dead NPC Short Button Begin OnActivate Player If GetDead == 1 && Player.GetItemCount AACIPotionResurrection >= 1 MessageBox "Do you want to use the potion 'resurrection?'" "Yes" "No" Else Activate EndIf End Begin Gamemode Set button to getbuttonpressed If button > -1 If button == 0 Player.RemoveItem AACIPotionResurrection 1 Resurrect Set button to 2 Endif Endif End Scripts like this are treacherous and you may need lots of testing and adjusting. The DoOnce functions often go awry. Link to comment Share on other sites More sharing options...
ciakko Posted February 14, 2011 Author Share Posted February 14, 2011 Thanks for now. I'll test it tomorrow Link to comment Share on other sites More sharing options...
TheSwedishPancake Posted February 14, 2011 Share Posted February 14, 2011 There is something I would add to David's advice: make sure you put a "1" after the "resurrect" command. I know that you can type "resurrect" into the console while playing and it will function properly, but in the Construction Set, you require a "1" after the command to have it function properly. Link to comment Share on other sites More sharing options...
ciakko Posted February 15, 2011 Author Share Posted February 15, 2011 It well works. Thanks a lot Link to comment Share on other sites More sharing options...
Recommended Posts