aveskite Posted January 29, 2015 Share Posted January 29, 2015 I'm completely inexperienced with scripting. I'm trying to make a simple script to disable access to the journal/inventory when in combat. Here's what I've got so far. scn aaaNoInventoryInCombat begin GameMode if player.isincombat == 1 player.disablecontrol 17 endif endWhat am I missing? Any help is appreciated. Link to comment Share on other sites More sharing options...
forli Posted January 29, 2015 Share Posted January 29, 2015 (edited) DisableControl must not be called on the player. It's a standalone command, so simply use: DisableControl 17Also, don't forget the inventory can be opened with the keys F1, F2, F3, F4, so you need to disable them as well.Don't forget to enable them back when not in combat, and store a variable to avoid calling "Disable*" continuously. Here: scn aaaNoInventoryInCombat Short inventoryDisabled Begin GameMode If Player.IsInCombat If (inventoryDisabled == 0) Set inventoryDisabled to 1 DisableControl 17 DisableKey 59 DisableKey 60 DisableKey 61 DisableKey 62 EndIf Else If (inventoryDisabled) Set inventoryDisabled to 0 EnableControl 17 EnableKey 59 EnableKey 60 EnableKey 61 EnableKey 62 EndIf EndIf End Edited January 29, 2015 by forli Link to comment Share on other sites More sharing options...
aveskite Posted January 31, 2015 Author Share Posted January 31, 2015 Thanks. That answers several questions for me about how the script should look. However, I tried it and unfortuantely I still can't get it to work. Any thoughts? Link to comment Share on other sites More sharing options...
Recommended Posts