- Supported Minecraft Versions
Allows users to perform any action you want by using customizable gestures. Uses custom events for maximum customizability.
This script requires Skript (obviously), SkBee (for the particles), and skript-reflect for most of the other stuff. It was coded using 2.6.4, 2.18.1 and 2.3 respectively.
Credit to @danny19990 on Discord who helped with the initial idea for this.
What is a gesture sequence?
- A gesture sequence is any number of directions the user can move their cursor. The options are up, down, left, and right.
- As an example, registering a gesture could be down using /gesture add up down - this would create an event (which can be used in any script) which would fire whenever the user performs the up down gesture.
- A custom event is registered which follows the syntax syntax gesture [[of] %gesture sequence%], which, for example, would accept any of the following as valid syntaxes for the gesture sequence of up down:
- on gesture of up down
- on gesture up down
- on gesture:
- if event-gesture is "up down":
- The event will throw an error on reload if an unregistered gesture is used in a script file. For example, if a script contains on gesture of up down: as an event, but up down isn't a registered gesture, it will error.
- The event currently has 2 event-values: player and gesture.
- Having the player means that you can use, for example, the send effect, or pass said player to a function. It is referred to in the same way as any other event.
- The gesture event-value is a new addition with the gesture system, which can only be used in the on gesture event. It can be called using the syntax [event[-| ]]gesture, which means event-gesture, event gesture and gesture are all valid. It simply returns, as a string, the gesture (e.g. for gesture up down, it would return "up down")
- Use command /gestures add (gesture sequence)
- The added gesture sequence should now be usable in the on gesture event.
- Use command /gestures remove (gesture sequence)
- If the removed gesture sequence was being used in an event, it will no longer execute that code, and on the next reload of the script will throw an error.
- Use command /gestures list
- Maybe more event-values (if I can properly figure out how the custom events work)
The original video at this link is no longer consistent with how the gesture system works now, but there is another video in the thread posted more recently which shows some of the changes.