DarknessFalls 9 Posted December 18, 2015 (edited) Flare-RegionNotification vs 1.0 Requires: Flare Notification Window Credit: Darknessfalls Can Be used in: Free and Commercial games. Download: Grab it here Want to have a notification play when you walk over a region? This is the script for you. 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: Paint a line of region 19 (see why a line below) Create a parallel event with the following script call: FlareRegionNotification.notifyOnRegionTouch("hello", false, true, {windowWidth: 500}, 19, 1); Play the game. 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); text: notification text stayAtTop: true/false fadeoutTowardsBottom: true/false options: See Flare Notification Script, how ever: Options are passed in as an object:windowWidth = The width of the notification window. windowX = The x position of the window. windowY = the y position of the window. fontSize = the font size for the window. Example: for options, you could pass in: {windowWidth: 400, windowX: 50, WindowY: 50, fontSize: 12} switchId: the id to turn on for a single region touch only. turnOnSwitchesForMultiRegions: Do you have multiple regions? If so,then each region will be a switch id thats turned on when the playertouches tone of those regions. 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. ATTN!! 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: FlareRegionNotification.resetNotificationSwitches(regionId); 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. Edited December 18, 2015 by DarknessFalls 1 Share this post Link to post Share on other sites