This is just out of a text file I wrote and never finished. It should be some use to some of you though...
Using the Console
The console allows you to change all the constants related to the plugin, and
make sequences of events be performed when a certain key is pressed, all by a
text-mode interface. In the professional version of this plugin, the console
can be accessed from another computer connected to the first by a network. This
allows options to be changed, and announcements to be displayed without anything
appearing on the screen beforehand.
To change something or look at something in the console, you must type in a command.
If a command has no parameters, just its name can be typed:
GETSCENE will return the current scene number
If a command has parameters, they must go in brackets after
it, separeted by commas:
SCENECHANGE(2,3) changes to scene 2 with fade 3
Multiple commands can be fitted on one line, using a semi-colon to separate them.
TEXSIZE(0,64,64);TEXLOAD(0) stretches the first custom texture to 64x64 pixels wide and loads it onto OpenGL
One Command can be a parameter of another, and the value it returns will be used.
SCENECHANGE(PICKSCENE,PICKFADER) changes the scene to a scene chosen at random with a fade chosen at random
If you want text to be input into a command, you must enclose it with square brackets:
ANNOUNCE(0,10,[Hello!!!!]) will display an announcement of type 0, for 10 seconds, saying "Hello!!!!"
Finding/Using Commands and Variables
To get a list of variables, type VARLIST and of commands type CMDLIST.
R2 has a help system which runs in the console. simply type HELP([CommandName])
Some commands do not have help at the moment, or have sketchy help at best. if you think of something
that needs adding, please mail me.
Binding
Binding is probably the most useful bit of the console. It allows you to 'bind'
a command or series of commands to an event (eg. a keypress). To bind a command, call
the BIND command, specifying an event, and the command to perform (in square brackets):
BIND([VK_LEFT],[WAFUNC PREV]);BIND([VK_RIGHT],[WAFUNC NEXT]) makes the left and right arrow keys make WinAMP go to the next or previous track
To remove a command associated with an event, use UNBIND specifying the event name:
UNBIND([VK_LEFT]);UNBIND([VK_RIGHT]) Stops the arrow keys from controlling WinAMP
Note that keys defined with bind do not work when a window is open. If you need them to,
you can use the commands CONSOLEKEYON and CONSOLEKEYOFF, specifying the event in the same
way as UNBIND.
BIND is not limited to keys though, events exist such as: R2_START (when R2 starts up),
R2_STOP (when R2 quits) and R2_FRAME (called every frame). In the same way, by typing
in a number above 2000 you can save a series of commands, which can then be called using
the EXECUTEBIND command.
|