Skip to main content

TRIGGER_RANDOM

Keywords: TRIGGER_RANDOM, RANDOM
Syntax: RANDOM <percent> The argument is a number between 0 and 100. This trigger is checked at each PULSE_MOBILE and if the argument is greater than a percentage roll the trigger is activated. This will happen even if there is no player character (PC) in the room with the mobile, but there must be players in the same area. To activate this trigger without PCs inside the area you need include the act flag update_always on the mobile. Note that if the mobile has two random triggers and the first trigger in the MOBprogram list has an argument of 100, the other random trigger will never be activated, no matter if you set it to 100 too. It is very nice give a personality to a mob to make it more alive, but don't set the argument too high to avoid spams. See the mobile doing something different is nice, but after some time see the mobile doing it over and over is annoying. Examples: RANDOM 20 This trigger will be activated if the percentage roll is lower than 20. RANDOM 100 This trigger will be activated each PULSE_MOBILE, because the percentage roll will always be lower than 100.