paha989 Posted January 17, 2016 Share Posted January 17, 2016 So i am trying to get this script working that shows a message box and ask's the player to1.start the battle (this button should enable the npc's)2.reset the battle ( this button should move the npc's to xmarker and disable them)3.exit (just simply exits the message box) But the script wont enable/disable the npc's Here is a link to the script --> https://www.dropbox.com/s/0d2wm0fep7ft4dk/Geck%20Script1.txt?dl=0Here is a link to npc reference pic --> https://www.dropbox.com/s/py0818h3jgu087t/geck.jpg?dl=0 Link to comment Share on other sites More sharing options...
Deleted1205226User Posted January 17, 2016 Share Posted January 17, 2016 (edited) 1.You need to have a space after the == sign.2. Make it:if Button == 0Your listElseif Button == 1Your listendif 3. Why is there a DoOnce? Edited January 17, 2016 by Guest Link to comment Share on other sites More sharing options...
paha989 Posted January 17, 2016 Author Share Posted January 17, 2016 You need to have a space after the == sign, like: if DoOnce == 0Did that but it didn't help, still the same problems. Link to comment Share on other sites More sharing options...
Deleted1205226User Posted January 17, 2016 Share Posted January 17, 2016 *See edits above. Start your script with GameMode. Link to comment Share on other sites More sharing options...
paha989 Posted January 17, 2016 Author Share Posted January 17, 2016 :dance: Thanks it started working! :thumbsup: And the reason why there was (doonce) is because i was following this tutorial --> https://www.youtube.com/watch?v=2r68E9VmI2ANow i just have to add one more script and do some playtesting and then this mod is complete. Link to comment Share on other sites More sharing options...
Deleted1205226User Posted January 17, 2016 Share Posted January 17, 2016 Good!As it is now, DoOnce as no use here, you can take it out. Link to comment Share on other sites More sharing options...
paha989 Posted January 17, 2016 Author Share Posted January 17, 2016 Yeah i took it out. Also do you now is there a way to have a script that "uses the reference that it is attached to". So for example something like this: (current reference.resurrect)What i am trying to do is have a timer script that checks if the npc's is dead and if the npc is dead it would resurrect them. Link to comment Share on other sites More sharing options...
madmongo Posted January 17, 2016 Share Posted January 17, 2016 (edited) Make a ref variable, then set it to GetSelf, e.g.: ref MyRef Set MyRef to GetSelf if MyRef.GetDead == 1 MyRef.resurrectendif (this is just off the top of my head and not tested, but it should be something like this) Edited January 17, 2016 by madmongo Link to comment Share on other sites More sharing options...
paha989 Posted January 17, 2016 Author Share Posted January 17, 2016 Thanks! Will try this tomorrow. Link to comment Share on other sites More sharing options...
Recommended Posts