dubiousintent Posted January 15, 2017 Share Posted January 15, 2017 From the GECK wiki page on "Variables": Although you can declare a variable to be Short or Long, both produce the same result as Int. -Dubious- Link to comment Share on other sites More sharing options...
psrfreddyz06 Posted January 15, 2017 Author Share Posted January 15, 2017 From the GECK wiki page on "Variables": Although you can declare a variable to be Short or Long, both produce the same result as Int. -Dubious-Oh i must have missed that, Thank you!! :) Link to comment Share on other sites More sharing options...
Mktavish Posted January 16, 2017 Share Posted January 16, 2017 I managed to get this work!!!! Here is the script: ScriptName EHRevScript begin onactivate player Short inventory Short onstand Set inventory to player.getitemcount Weap32CaliberPistol Set onstand to EHmagREF1.getdisabled If onstand == 1 If inventory >= 1 Player.removeitem Weap32CaliberPistol 1 1 EHmagREF1.enable 0 Endif Endif If onstand == 0 EHmagREF1.disable Player.AddItem Weap32CaliberPistol 1 EndIf End It works perfectly fine.. Can you see any errors/something that i can change? P.S i do NOT take credit for this, 99% is copied from the UH mod. Next step is to understand everything haha Ya the thing to note about yours ... is that your weapon display will also repair the weapon to 100% as a by product.Simply because the player is not getting back their instance of the weapon ... but a brand new one. In that instance of UndergroundHideout ... they are storing the weapon health as a variable ... then destroying it.But then modifying the new weapon with that variable when the player gets it back. Link to comment Share on other sites More sharing options...
Mktavish Posted January 17, 2017 Share Posted January 17, 2017 (edited) And if you need to keep the weapon condition on a bunch of weapons ... instead of making a weapon condition variable for each one ...You just move the weapon to a container. let the built in scripting do it for you. Edited January 17, 2017 by Mktavish Link to comment Share on other sites More sharing options...
psrfreddyz06 Posted January 18, 2017 Author Share Posted January 18, 2017 And if you need to keep the weapon condition on a bunch of weapons ... instead of making a weapon condition variable for each one ...You just move the weapon to a container. let the built in scripting do it for you.I don't really care about the weapon health, so this works fine for me. Thanks for all of your help!! :) Link to comment Share on other sites More sharing options...
psrfreddyz06 Posted January 26, 2017 Author Share Posted January 26, 2017 (edited) I have a small problem once again, I'm testing around a bit. Here is my script: ScriptName EHKnifeScript begin onactivate player Short inventory Short onstand If GetIsid 0EHKnife Set inventory to player.getitemcount WeapKABARMMP Set onstand to KnifeREF.getdisabled If onstand == 1 If inventory >= 1 Player.removeitem WeapKABARMMP 1 1 Player.removeitem WeapTKABARMMP 20 1 KnifeREF.enable 1 Endif Endif If onstand == 0 KnifeREF.disable Player.AddItem WeapKABARMMP 1 Player.AddItem WeapTKABARMMP 20 elseIf GetIsid 0EHGrifle showmessage TrapGrenadeHarvest else endif EndIf EndIf End But when i press the "0EHGrifle" activator ingame. No message comes up.. What have i done wrong? :o Everything before the "elseIf GetIsid 0EHGrifle" is working fine.. Cheers! EDIT: Solved it.. I had one of the "Endif" in the wrong place! Edited January 26, 2017 by psrfreddyz06 Link to comment Share on other sites More sharing options...
Recommended Posts