Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for the actual bind script code go to here: http://pastebin.com/a6Z8udCZ
- To use the bind script have a look at the inofficial Vendetta-Online Wiki here: http://www.vo-wiki.com/wiki/Binds#Loading_a_Bind_.28.2Fload_filename.cfg.29
- *** myTurbo v0.9 by Alphantomega 2014-01-29
- This is a pseudo-programming language which helps me personally to analyze and understand a problem
- and finding solutions. The "language" is inspired by C#, Javasript etc. There is no "real" or "right" syntax. Again, it is just to help me understand.
- But: I can use these statements because of their structure and put them into "legal" "Vendetta Online bind script" code.
- And: as I am tired and should be in bed for about 3 hours, there is (and will never be) a guarantee on this or any other documentation being in concense with the bind script code, and the other way around.
- Still: enjoy!
- By the way: this "tap to toggle and push and hold to turn on" thing can be used for many other things, e.g. "Flight Mode assist", mouse view toggling etc. But not now, later maybe.
- external calls
- {
- +myTurbo = onButtonPress
- -myTurbo = onButtonRelease
- }
- internal states
- {
- stateZero -- no key is tapped or pressed
- stateFirstPress -- a key has been tapped or pressed - indetermined until now
- stateSecondPress -- the previous key is still being pressed / has not been released yet
- substateTurbo -- helper for missing "if then" ability
- substateTurboIsOn -- if more/other/more precise states are required,
- substateTurboIsOff -- the naming should be done mor specific
- }
- internal functions
- {
- doToggleTurboOn =
- {
- doTurboOn
- substateTurbo = substateTurboIsOn
- }
- doToggleTurboOff =
- {
- doTurboOff
- substateTurbo = substateTurboIsOff
- stateZero
- }
- doTurboOn =
- {
- +turbo 1
- }
- doTurboOff =
- {
- +turbo 0
- }
- doNothing =
- {
- -- a nicer way (to say nil) than alias'ing empty brackets like ""
- }
- }
- stateSetups
- {
- do stateZero
- {
- -- a disabled turbo is always in stateZero (so, doToggleTurboOff always returns to stateZero)
- -- but stateZero may have both states (on or off)
- onButtonPress = stateFirstPress
- onButtonRelease = doNothing -- actually, this cannot be called in stateZero
- -- because onButtonRelease reqires onButtonPress
- -- which would automatically put the state 1 shift up
- }
- do stateFirstPress
- {
- substateTurboIsOn =
- {
- onButtonPress = stateSecondPress
- onButtonRelease = doToggleTurboOff
- }
- substateTurboIsOff =
- {
- doToggleTurboOn
- onButtonPress = stateSecondPress
- onButtonRelease = stateZero
- }
- }
- do stateSecondPress
- {
- doToggleTurboOn
- onButtonPress = doTurboOn
- onButtonRelease = doToggleTurboOff
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment