2x Action to set custom vibrations on an
Android phone.
Android Vibrate AdvanceOption 1. Set the length of vibration in milliseconds
Option 2. Set a vibration pattern in milliseconds with a loop(repeat).
Android Vibrate Advance Array
Using: ArrayList - Only for pattern setup with a loop(repeat). Set a pattern from an
int array
Android Vibrate Advance Array2
Using: Array - Only for pattern setup with a loop(repeat). Set a pattern from an
int array
Pattern setup: If set incorrectly, you may get odd behavior(s) as a result!
How does it work: Element 0 = 0 (start the pattern - Gap in vibration)
Element 1 = Vibrate
Element 2 = Gap in vibration
Element 3 = Vibrate
etc..
Odds are the vibrate and evens are the gaps.
The first index(first pattern) is the start of the pattern and it is a gap. Meaning that 0 is an immediate start. You can delay the start of the vibration by setting the first index to xxxms. Then it is vibrate - gap - vibrate - gap etc.
Repeat: 0 means repeat the pattern starting at the beginning (loop). -1 means repeat/loop is off. Anything above >0 is the amount of times it will vibrate the pattern.
Action OptionsCancel vibration: Will cancel the current vibration. You need to re-enter the action with 'cancel vibration' fsmbool set to true.
Do not do this immediately after calling vibrate as it may not have time to even begin vibrating.Disable Sleep Timeout: When the phone goes to sleep / lock, the vibration will stop. When set to true, the phone will not sleep. Use the 'SetSleepTimeOut' action to reset to whatever setup you need after the vibration is finished.
action in Ecosystem or
https://github.com/dudebxl/PlayMakerCustomActions_U5/A big thanks to PlaymakerNOOB for all his feedback and advice.