2Dope Posted June 15, 2009 Share Posted June 15, 2009 EDITED: Sorry, worked out what I needed to do. Link to comment Share on other sites More sharing options...
2Dope Posted June 15, 2009 Author Share Posted June 15, 2009 Ok, now I DO have a problem with my Gun Rack Display ... But its not with my script ... Here's my script code (with generic references): scn GunDisplayScript BEGIN OnClose if (LockerRef.GetItemCount Weap10mmPistol > 0) WeaponRef.enable elseif (LockerRef.GetItemCount Weap10mmPistol == 0) WeaponRef.disable endif END That works fine if I use it on a standard container found in the game, like a footlocker, or vault locker. If I create my own container, choose the mesh I want to use, and set that script to my new container, it no longer works... Can anyone shed some light on this? (Yes, all my references work, else the script wouldn't save :P) Link to comment Share on other sites More sharing options...
2Dope Posted June 16, 2009 Author Share Posted June 16, 2009 I'm guessing noone has ran in to trouble running scripts on custom containers using OnOpen or OnClose? :confused: Link to comment Share on other sites More sharing options...
BadPenney Posted June 16, 2009 Share Posted June 16, 2009 Have you tried OnActivate? Link to comment Share on other sites More sharing options...
2Dope Posted June 16, 2009 Author Share Posted June 16, 2009 Have you tried OnActivate? OnActivate doesn't appear to work unless its an activator, but that's not what I want, as that will check on activation, whether to display guns contained in it, therefore I would have to use the container twice, once to put guns in, and once again to make it check. Basically the script runs once my container closes to check whether to display the guns contained in it. But it doesn't appear to work with custom containers. It's doing my head in trying to get it to work, maybe its a bug within the game itself, not what I am doing with the container/script... I dunno... Link to comment Share on other sites More sharing options...
AlexxEG Posted June 21, 2009 Share Posted June 21, 2009 You most use "Begin GameMode" other then everything should work EDIT: OnActivate works on almost everything, just wanted to say^^ Link to comment Share on other sites More sharing options...
2Dope Posted June 22, 2009 Author Share Posted June 22, 2009 AH! After a little bit of messing around, used gamemode, and my custom container now runs the script properly. Thanks Alexx378! PS, it was probably the way I was using OnActivate at the time when it wasn't working (was just starting modding, so probably didn't quite understand how it worked) Link to comment Share on other sites More sharing options...
Recommended Posts