Jump to content

Scripting Help


danthegeek

Recommended Posts

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 onclose

Activate Player

EHweaponswalltriggerREF.activate

End

 

----------------------------------------

 

ScriptName EHweaponscachetrigger

;script should activate the static weapon reference

 

Short count

 

Begin OnActivate

Set 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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...