I began testing scripting functions inside my game engine. I would like to be able to detect if the player enter a key say mouse left click or space bar - then output to the Level Editor's console. I have to currently outputting in a message box.
So during rendering time - i have the angelscript rebuild modules and executing the functions needed. What I've noticed is the output text is constantly being written multiple times over and over again not only when I hit a space bar or whatever. If I press the space bar I want the output to write to a rich text box only once when the a key is pressed - not multiple times.
Would I have to set up a delegate and a event handler to handle new incoming messages behind handled by the script?
-If KeyPressed Is True
-Output To Editor's Console
-If KeyPressed is False
- Do Nothing.