Flare Region Notification Download

Below is the Readme file for the script. You can also get the script by clicking the download link which will inturn take you to github.

All credit must be given to me: Adam Balan.

Scripts may be used in comercial games


Want to have a notification play when you walk over a region? This is the script for you.

You must have Flare Notification installed

So lets assume you have region 19 and when the player touches you want to say "hello world". So what you do is the following:

Lets go over what you just created:

The params for the script call are as follows:

FlareRegionNotification.notifyOnRegionTouch(text, stayAtTop,
   fadeoutTowardsBottom, options, regions, switchId, turnOnSwitchesForMultiRegions);

So what you have done is: create a notification with text of "hello world" and, don't stay at the top, fade out towards the bottom, set the width of the window to 500, only play when player touches region 19 and then turn on switch id 1.

Multiple Regions

FlareRegionNotification.notifyOnRegionTouch("hello", false, true, {windowWidth: 500}, [19, 15, 78], 0, true);

This one does the same thing as you have seen above, accept this time we say, don't use a single switch, instead use the region id as the switch.

What this does is creates a notification when the user touches region id 19, 15 or 78. When the player does we have a switch id set turned on with id: 19, 15, 78.


If you pass in false or nothing (default false) then we wont use a switch id, even if you pass one in. If you pass in a switch id and false for the last two arguments then what happens if we do nothing.

Turn off Switch id on region touch.

Now that you have the notification playing on one or more regions and you have decided to set a switch when the region notification event is played, how do we reset that switch with out an event?

In the same parallel process you created you'll want to place the following code:


What this does is say reset notification switches for all switches when this region is touched. So assume you had region id 12, 15, 16, 19 and 20 all play a notification of "hello bob" when the player touched the region. Well when you call the above function with a param of, for example, 50, then every time a player touches region 50, all the switch id's, in this case: 12, 15, 16, 19 and 20 will be reset so that the notification can play again when the player touches those regions.

But I only want to reset one of those switches ...

Ok, so now we use the same example as above, but instead of calling resetNotificationSwitches, we call resetSpecificSwitchId same signature as the resetNotificationSwitches accept the second argument is a switch id:

FlareRegionNotification.resetSpecificSwitchId(regionId, switchId);

This does the exact same thing as above, accept it only resets a specific switch id instead of all switch id's on region touch.