Talk:GetButtonPressed

From the Oblivion ConstructionSet Wiki
Revision as of 23:12, 7 December 2007 by imported>Haama (Reason why I switched the buttonpressed flags)
Jump to navigation Jump to search

The example script does an infinite loop. Because the GetButtonPress is in GameMode, it will keep getting the button pressed over and over, thus displaying the final dialog over and over again. I edited the code to fix this error. --Snarker 22:27, 7 December 2007 (EST)

I switched the buttonpressed flags. When a mod is first loaded in the game, every object's script runs once. When a variable is set on an object, it will run the next frame. The way it was set up before, it would continue to use GetButtonPressed until the player enters a MenuMode. In this particular case it's minor, but it can add up and is a good habit to re-enforce.--Haama 23:12, 7 December 2007 (EST)