UnrealOni/Documentation: Difference between revisions

m
dev console (construction)
m (Cheat codes, kangaroo)
m (dev console (construction))
Line 129: Line 129:
==Debugging==
==Debugging==
===Live scripting===
===Live scripting===
[[Image:UnrealOni_dev_console.png|right|thumb|dev console (construction)]]
In Oni you can do some scripting with the developer console.
In Oni you can do some scripting with the developer console.


We probably should also allow for some manipulations of functions and variables like '''''ai2_chump''''' and '''''chr_debug_characters = 1'''''.
We probably should also allow to call functions and set some variables like '''''ai2_chump''''' and '''''chr_debug_characters = 1'''''.


This requires a user widget and a key binding which will be ^ by default.
This requires a user widget and a key binding which will be # + Alt by default.


The = sign and spaces serves as separator. A select node can then link to the individual variables.
: The ^ sign is a bad choice as it is not consumed and will be added to the first character, making âi2_chump an invalid command.
 
: The dev console will not require a cheat in order to activate it on key press. While developing this '''''test''''' it won't make sense to restrict its access.
 
The widget is created by the player controller and attached to the viewport.
 
Alt + # will toggle the visibility and makes the input box ready for typing.
 
The text box has a On Text Committed where inputs can be processed.
 
'''Clear Keyboard Focus on Commit''' was set to '''False''' in order to allow repetitive input.
 
Todo: Use = sign and spaces as separator and a select node to handle the different variables and functions.
8,018

edits