| Blockland Files > Add-Ons |
| Event_percentEventEnabled |
| (1/1) |
| Naruto Uzumaki:
This event is basically setEventEnabled but based on random chance. It will randomly set an event to enabled or disabled depending on a factor you set. For example: When the minigame restarts, there is a 40% chance this door will be unlocked. Download Has this been done before? |
| gr8dayseth:
--- Quote from: Naruto Uzumaki on March 21, 2019, 04:23:58 AM ---Has this been done before? --- End quote --- don't believe so this could have very interesting uses i imagine |
| mctwist:
It actually is just a wrapper around setEventEnabled. So it's not "an event", but more like "events". I would like to suggest that you add an eventScriptLabels.txt file to your archive so it will support EventScript. --- Code: (eventScriptLabels.txt) ---percentEventEnabled 1 1 --- End code --- Note that those whitespaces are tabs, not spaces. Copy this and add to the file described and people using EventScript may be happier to use this. Also, I may recommend using EventScript standard to show how the event is used. --- Code: (EventScript) ---toggle: onActivate -> Self -> door("Toggle") onMiniGameReset -> Self -> percentEventEnabled(40, [toggle]) --- End code --- This is just optional, though. |
| Navigation |
| Message Index |