antstubell Posted November 27, 2019 Author Share Posted November 27, 2019 Back to the 'Pressing Buttons In Correct Sequence' thing. I'm kind of stuck. I am taking the approach of using Int Properties so the script looks for the expected value and checks it against the required value. Then sets a new value.Button 1 - stores 1 in a global variable.Button 2 - stores 2 in a global variable.And so on up to 8Buttons have to be pressed in order, simply Button 1, Button 2, Button 3... Button 8.So for example-Button 6 needs to check that the value stored in the Global variable is 5 then set it to 6Button 7 needs to check that the value stored in the Global variable is 6 then set it to 7 What I've scripted so far, haven't compiled yet as it probably has syntax errors is this... GlobalVariable Property StoredValue Auto; number stored when a button is pressedInt Property InputValue Auto; Input the number of this buttonEvent OnActivate(ObjectReference akActionRef)If (StoredValue.GetValue()) == (InputValue); check that the previously stored value matches the value that we inputdebug.notification("This is the next correct button in the sequence")StoredValue.SetValue(InputValue)ElseStoredValue.SetValue(0)debug.notification("Incorrect. Start Over.")EndifEndevent I looked at arrays and although I understand what they are and what they do, I can't quite get my head around scripting them. haven't found any good examples to work from. But does my approach make sense? Link to comment Share on other sites More sharing options...
Recommended Posts