danthegeek Posted September 30, 2009 Share Posted September 30, 2009 I am having a heck of a time trying to get this to work correctly. I want a script that if you add items to a container it will display them if they are in the inventory. But I want the containers script to automatically activate a switch when the container closes so it will display the references. This is what i have so far. ScriptName EHcontainer;script should activate the EHweaponswalltrigger switch begin oncloseActivate PlayerEHweaponswalltriggerREF.activateEnd ---------------------------------------- ScriptName EHweaponscachetrigger;script should activate the static weapon reference Short count Begin OnActivateSet count to EHweaponscacheREF.getitemcount WeapAssaultRifle If ( count >= 1 ) EHAssaultRifleREF.enable else EHAssaultRifleREF.disable EndIf (etc. etc... for other weapons)End The second script works fine. If I hit the switch manually it will update the references. But when I close the container (first script) nothing happens and the switch does not activate. The reference for the switch is correct (EHweaponswalltriggerREF). Any help appreciated -Dan Link to comment Share on other sites More sharing options...
danthegeek Posted September 30, 2009 Author Share Posted September 30, 2009 Wow, I feel like an idiot. I changed it to begin GameMode and it works fine. Just add stuff to the container and it appears. I guess thats what i get for staring at VB, Java, and C++ all day. Thanks-Dan Link to comment Share on other sites More sharing options...
Recommended Posts