From wiki.ginstr.com
Jump to: navigation, search
m (fixed typos)
 
Line 3: Line 3:
 
[[Category:Action_Library]]
 
[[Category:Action_Library]]
  
;Description: Action used to play beed sound 
+
;Description: Action used to activate device vibrate function
  
 
;Action returns: void
 
;Action returns: void
Line 18: Line 18:
 
|-
 
|-
 
| <code>pattern</code>
 
| <code>pattern</code>
| Array of ints that are the durations for which to turn on or off the vibrator in milliseconds.  
+
| Array of intervals that are the durations for which to turn on or off the vibrator in milliseconds.  
The first value indicates the number of milliseconds to wait before turning the vibrator on. The next value indicates the number of milliseconds for which to keep the vibrator on before turning it off. Subsequent values alternate between durations in milliseconds to turn the vibrator off or to turn the vibrator on.  
+
The first value indicates the number of milliseconds to wait before turning the vibrator on.<br>
 +
The next value indicates the number of milliseconds for which to keep the vibrator on before turning it off.<br>
 +
Subsequent values alternate between durations in milliseconds to turn the vibrator off or to turn the vibrator on.  
 
* Can be:
 
* Can be:
 
** <code>hardcoded</code>
 
** <code>hardcoded</code>
Line 26: Line 28:
  
 
====Example====
 
====Example====
:<code>23,560,100,180,23,560,100,180</code> - turn on or off the vibrator in milliseconds<br>
+
:<code>23,560,100,180,23,560,100,180</code> - durations for which to turn on or off the vibrator in milliseconds<br>
 
:; ⤷ <code>[gn:act_vibrate]|[23,560,100,180,23,560,100,180]</code>
 
:; ⤷ <code>[gn:act_vibrate]|[23,560,100,180,23,560,100,180]</code>
 
<hr>
 
<hr>

Latest revision as of 11:57, 2 August 2017

gn:act_vibrate

Description
Action used to activate device vibrate function
Action returns
void

Action signatures

Vibrate device

[gn:act_vibrate]|[pattern]
Parameter Description
pattern Array of intervals that are the durations for which to turn on or off the vibrator in milliseconds.

The first value indicates the number of milliseconds to wait before turning the vibrator on.
The next value indicates the number of milliseconds for which to keep the vibrator on before turning it off.
Subsequent values alternate between durations in milliseconds to turn the vibrator off or to turn the vibrator on.

  • Can be:
    • hardcoded

Example

23,560,100,180,23,560,100,180 - durations for which to turn on or off the vibrator in milliseconds
[gn:act_vibrate]|[23,560,100,180,23,560,100,180]