Weather or Not

Map Description

  1. NOKYARD
    Scripts programmed by Yumudas Beegbut.

    Screen Effects Zones for customizing your maps Filter and FX inclusion and exclusion zones. In other words, rain outside, dry inside.

    This is fully compatible with our Variable Weather Prefab, which randomizes weather between 4 selected weather FX.

    This prefab provides a much more advanced method for handling Screen Effects than the standard Enter Hill/Exit Hill method. With the provided Inclusion Zones you are able to place any number of hills, each containing different FX and/or Filters.

    Additionally we provide Exclusion Zones which remove the map's default Screen Effects, say for the insides of bases.

    Here's the good part. Each of these zones can be nested within any other zone. For instance, if your map uses Heavy Rain as the default, you can place an Exclusion Zones within a cave to exclude the rain effects for players within the cave. You can then place an Inclusion Zone with Heavy Rain under an opening in the cave ceiling to simulate rain pouring in from the opening. You can place an Inclusion Zone within an Exclusion Zone. You can place an Exclusion Zone within an Inclusion Zone. You can also place Inclusion Zones within another different Inclusion Zone and the player will see the innermost FX.

    Here's how it works.

    The rectangular Joint Hinge is a Map Exclusion Zone. Players within this zone will not see the Map Default Screen Effects.
    [​IMG]


    The circular Joint Hinge is the Nested Exclusion Zone. You place these within an Inclusion Zone to prevent players from seeing the Inclusion Zone's Screen Effects.
    [​IMG]

    The Red and Blue Scripting Brains are the Inclusion Zones. There are no differences between the two but they are different colours to represent the fact that they can be used to show different FX.
    [​IMG]


    Scripting.

    The only script you will need to access is the bottom of Script #2 in the Red and Blue script Brains.
    Here you will set the Screen Effects Filter and/or FX.
    Set the hill to match your map's geometry.
    Set Boundary/Show to Off to hide the hill's boundary.
    [​IMG]

    There is no need to alter the scripts on the Exclusion Zones or the Green Map Default Zone. Please note that the prefab is set to NOT alter (Ignore) your Map Default Filter but this functionality is available by changing the Filter setting in Script #2.

    Scripts programmed by Yumudas Beegbut.
    Here's the script overview:

    A heartbeat sets all Player {whiskey} Numbers to 5 and all the Script 1's in the Weather Zones trigger and change their Screen FX back to the Map Default. If a Player is inside a Square Zone, {whiskey} gets set to 6, so no more Script 1's trigger and reset to Default. In the Squares Script 2 checks for {whiskey}==6 and sets the Screen FX to something other than the Default. The Circles check for {whiskey}==5 & 6 and update it to 7 so the Circles no longer affect the Screen FX. They also change the Screen FX to their nested override setting.

    - The lone brain's heartbeat script constantly sets all players' {whiskey} number to 5. Might be every 0.5 seconds
    -- Result: all players have {whiskey} reset to 5 (Code: Outside All Zones)
    -- Their Screen FX is also set to Default and it'll stay that way unless they're in a zone and {whiskey} gets changed to 6 or 7
    - Script 1 for each zone reacts to {whiskey}==5 (each one fires in order, for the whole batch of players spawned... i.e. Extra [add]) as long as the number stays 5
    - Any players inside a zone get their {whiskey} number increased to 6 (Squares) or 7 (Circles)
    -- Result: Script 1 Number Check conditions checking for 5 no longer trigger for those players, so the Screen FX won't get reset
    -- If {whiskey}==7 then Script 2 in the Squares no longer triggers since they trigger on 6 (Circles override squares this way)
    - The last action for the Squares Script 1 always resets the Screen FX to Default, and it's up to Script 2 to override that
    - Script 2 uses Number Check to check for {whiskey}==6 (Squares) or {whiskey}==7 (Circles)
    - If any Script 1 set {whiskey} to those, they trigger and change the Screen FX to the value that overrides the Map Default inside that zone
    - For the Circles, Script 2 is actually just a copy of Script 1 that checks for {whiskey}==7

Discussion

  1. NOKYARD

    NOKYARD GrifballHub
    Cartographer Forge Critic Senior Member

    Messages:
    852
    Likes Received:
    1,338
    Next up. Static Weapon Timers.
     
  2. Portaleer

    Portaleer THE FORGERUNNER
    Staff Member Forge Critic

    Messages:
    311
    Likes Received:
    542
    This is great @NOKYARD we've needed something like this for a while. Thanks!
     

Share This Page