• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Day/night models, and trigger won't work

Status
Not open for further replies.
Level 7
Joined
Jul 9, 2012
Messages
159
Hello again :)
I have yet other issues with this annoying trigger!

The trigger is supposed to check whether a player's ingame-camera is within a region (the region is called "Realm of Madness"), and then set make all surroundings dark by call SetDayNightModels("","").

Here is my messy trigger:
  • DayNight Models
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Player Group - Remove all players from NetherCheckPG
      • Set NetherBooleanPG = (All players controlled by a User player)
      • Set NetherPlayerInteger = (Number of players in NetherBooleanPG)
      • For each (Integer NetherPlayerIndex) from 1 to NetherPlayerInteger, do (Actions)
        • Loop - Actions
          • Set NetherPlayer[NetherPlayerIndex] = (Random player from (All players matching ((((Matching player) is in NetherBooleanPG) Equal to True) and (((Matching player) is in NetherCheckPG) Equal to False))))
          • Player Group - Add NetherPlayer[NetherPlayerIndex] to NetherCheckPG
          • Custom script: if GetLocalPlayer() == udg_NetherPlayer[udg_NetherPlayerIndex] then
          • Set CameraPoint[NetherPlayerIndex] = (Target of current camera view)
          • Custom script: endif
          • Set NetherPlayerGroup[NetherPlayerIndex] = (All players matching ((Realm of Madness <gen> contains CameraPoint[NetherPlayerIndex]) Equal to True))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (NetherPlayer[NetherPlayerIndex] is in NetherPlayerGroup[NetherPlayerIndex]) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • NetherBoolean[(Player number of NetherPlayer[NetherPlayerIndex])] Equal to False
                • Then - Actions
                  • Game - Display to NetherPlayerGroup[NetherPlayerIndex] the text: Realm of Madness
                  • Set NetherBoolean[(Player number of NetherPlayer[NetherPlayerIndex])] = True
                  • Custom script: if GetLocalPlayer() == udg_NetherPlayer[udg_NetherPlayerIndex] then
                  • Custom script: call SetDayNightModels("","")
                  • Custom script: endif
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • NetherBoolean[(Player number of NetherPlayer[NetherPlayerIndex])] Equal to True
                • Then - Actions
                  • Game - Display to NetherPlayerGroup[NetherPlayerIndex] the text: Icecrown
                  • Set NetherBoolean[(Player number of NetherPlayer[NetherPlayerIndex])] = False
                  • Custom script: if GetLocalPlayer() == udg_NetherPlayer[udg_NetherPlayerIndex] then
                  • Custom script: call SetDayNightModels("","")
                  • Custom script: endif
                • Else - Actions
          • Custom script: call DestroyForce(udg_NetherPlayerGroup[udg_NetherPlayerIndex])
      • Custom script: call DestroyForce(udg_NetherBooleanPG)
I have 2 problems concerning the trigger! :)
The first one is that the trigger keeps triggering the action
  • Game - Display to NetherPlayerGroup[NetherPlayerIndex] the text: Realm of Madness
, which isn't supposed to happen, and it never triggers
  • Game - Display to NetherPlayerGroup[NetherPlayerIndex] the text: Icecrown
, which I might fear means that it doesn't turn off the day/night-models action too.

My second problem is that I haven't found the proper action to turn
  • Custom script: call SetDayNightModels("","")
off yet :grin:

It's a rather confusing question I have made. I hope you all get it, or just ask otherwise, and I will try to explain it in another way! Thank you!
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Second issue:
You need to specify the day/night models.
Find them in the mpq under: Environment\DNC\
e.g. for Ashenvale put Environment\DNC\DNCAshenvale\DNCAshenValeTerrain\DNCAshenValeTerrain.mdx

I haven't tried this before, but I'm assuming that the first argument is the Terrain.mdx and the second argument will be the Unit.mdx
 
Level 7
Joined
Jul 9, 2012
Messages
159
I don't quite get this? :)
Can I ask for a a huge favor? Creating the custom script correctly with the Icecrown Glacier environment. Because I'm rather confused with the mpq file too!

Edit:
My trigger looks like this now:
  • DayNight Models
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Player Group - Remove all players from NetherCheckPG
      • Set NetherBooleanPG = (All players controlled by a User player)
      • Set NetherPlayerInteger = (Number of players in NetherBooleanPG)
      • For each (Integer NetherPlayerIndex) from 1 to NetherPlayerInteger, do (Actions)
        • Loop - Actions
          • Set NetherPlayer[NetherPlayerIndex] = (Random player from (All players matching ((((Matching player) is in NetherBooleanPG) Equal to True) and (((Matching player) is in NetherCheckPG) Equal to False))))
          • Player Group - Add NetherPlayer[NetherPlayerIndex] to NetherCheckPG
          • Custom script: if GetLocalPlayer() == udg_NetherPlayer[udg_NetherPlayerIndex] then
          • Set CameraPoint[NetherPlayerIndex] = (Target of current camera view)
          • Set NetherPlayerGroup = (All players matching ((Realm of Madness <gen> contains CameraPoint[NetherPlayerIndex]) Equal to True))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Realm of Madness <gen> contains CameraPoint[NetherPlayerIndex]) Equal to True
            • Then - Actions
              • Custom script: call SetDayNightModels("Environment\\DNC\\DNCUndergound\\DNCUndergoundTerrain\\DNCUndergoundTerrain.mdx", "Environment\\DNC\\DNCUndergound\\DNCUndergoundUnit\\DNCUndergoundUnit.mdx")
            • Else - Actions
              • Game - Display to (All players) the text: !
          • Custom script: call DestroyForce(udg_NetherPlayerGroup)
          • Custom script: endif
      • Custom script: call DestroyForce(udg_NetherBooleanPG)
And I have set the "Custom Light Environment" to underground in the options menu. However the custom script isn't causing desyncs but isn't working properly either. It makes the map darkened everywhere but where the lights are, but it isn't turning the light on again.

have I done something totally wrong, or????
 
Last edited:
Status
Not open for further replies.
Top