- Joined
- Jul 9, 2012
- Messages
- 159
Hello everyone!
I'm struggling with a trigger:
A periodic loop checks if a player's in-game camera is within a region, and then runs the call SetDayNightModels("","") for the player by using GetLocalPlayer. It changes the DayNightModels back to normal if the camera is not within the region anymore.
I tested the map with a friend, and we disconnected every time the GetLocalPlayer runned. It desynced, but I don't know why. Hope you can help me find the problem
I'm struggling with a trigger:
A periodic loop checks if a player's in-game camera is within a region, and then runs the call SetDayNightModels("","") for the player by using GetLocalPlayer. It changes the DayNightModels back to normal if the camera is not within the region anymore.
I tested the map with a friend, and we disconnected every time the GetLocalPlayer runned. It desynced, but I don't know why. Hope you can help me find the problem
-
Spooky Passage DNC Loop
-
Events
- Time - Every 0.25 seconds of game time
- Conditions
-
Actions
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
- Set SpookyPassageDNC_player = (Picked player)
- Set SpookyPassageDNC_p = (Target of current camera view)
- Set SpookyPassageDNC_i = (Load 1 of (Key (Picked player)) from SpookyPassageDNC_hashtable)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Spooky Passage <gen> contains SpookyPassageDNC_p) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SpookyPassageDNC_i Equal to 0
-
Then - Actions
- Set SpookyPassageDNC_i = 1
- Custom script: if GetLocalPlayer() == udg_SpookyPassageDNC_player then
- Cinematic - Fade in over 0.50 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 25.00% transparency
- Custom script: call SetDayNightModels("","")
- Custom script: endif
- Hashtable - Save SpookyPassageDNC_i as 1 of (Key (Picked player)) in SpookyPassageDNC_hashtable
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SpookyPassageDNC_i Equal to 1
-
Then - Actions
- Set SpookyPassageDNC_i = 0
- Custom script: if GetLocalPlayer() == udg_SpookyPassageDNC_player then
- Custom script: call SetDayNightModels("Environment\\DNC\\DNCAshenvale\\DNCAshenValeTerrain\\DNCAshenValeTerrain.mdx","Environment\\DNC\\DNCAshenvale\\DNCAshenValeUnit\\DNCAshenValeUnit.mdx")
- Custom script: endif
- Hashtable - Save SpookyPassageDNC_i as 1 of (Key (Picked player)) in SpookyPassageDNC_hashtable
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Custom script: call RemoveLocation(udg_SpookyPassageDNC_p)
-
Loop - Actions
-
Player Group - Pick every player in (All players) and do (Actions)
-
Events