truestiven Posted May 25, 2014 Share Posted May 25, 2014 Hello everyone! I'm trying make item in my mod unrepaireble. I set hp of this item to 999999, and set "none" in repair list. But when that item is crafted on workbench, the item still don't have 100% hp, and still can be repaired with another instance of that item. I'm trying write script, that will be set hp of just crafted item to 100%, but it doesn't working( Please, can you give me some advice about how to make it work? scn sAutoRepair int DoOnce Begin GameMode if DoOnce != 1 Set rSelf to GetSelf rSelf.SetCurrentHealth 100 Set DoOnce to 1 endif end Link to comment Share on other sites More sharing options...
luthienanarion Posted May 25, 2014 Share Posted May 25, 2014 You didn't declare rSelf as a variable, and you didn't need it anyway. Link to comment Share on other sites More sharing options...
truestiven Posted May 25, 2014 Author Share Posted May 25, 2014 You didn't declare rSelf as a variable, and you didn't need it anyway.I declare it in script, just missed that when copy-pasted the script in to my post. And without rSelf, geck won't saved my script. Link to comment Share on other sites More sharing options...
jazzisparis Posted May 26, 2014 Share Posted May 26, 2014 Attach the script to the item in question and use this code: scn sAutoRepair begin OnAdd SetCurrentHealth 999999 end Link to comment Share on other sites More sharing options...
truestiven Posted May 26, 2014 Author Share Posted May 26, 2014 Attach the script to the item in question and use this code: scn sAutoRepair begin OnAdd SetCurrentHealth 999999 end It doesn't work. But anyway, thx :) Link to comment Share on other sites More sharing options...
Recommended Posts