• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] A bug, why does it bug?

Status
Not open for further replies.
Level 17
Joined
Jun 12, 2007
Messages
1,261
Oke, I made a trigger to circle around a terrain for selecting a map.
At start you get to map 1. When you press right or left you browse through the maps and circle around the center of the selected map.

The problem is that the very first time it rotates not around the point I tell him to, but at the edge.

  • Show
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Set Map = 1
      • Environment - Set fog to style Linear, z-start 0.00, z-end 7000.00, density 0.50 and color (60.00%, 60.00%, 100.00%)
      • Environment - Change water tinting color to (60.00%, 60.00%, 100.00%) with 0.00% transparency
      • Set TempCamPoint = (Center of Battle Zone 1 <gen>)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Set the camera bounds for (Picked player) to Battle Zone 1 <gen>
          • Camera - Pan camera for (Picked player) to TempCamPoint over 0.00 seconds
          • Camera - Rotate camera 360.00 degrees around TempCamPoint for (Picked player) over 60.00 seconds
      • Game - Display to (All players) for 30.00 seconds the text: (PlayerColor[7] + Temerai Forest)
      • Custom script: call RemoveLocation(udg_TempCamPoint)
The Left and Right movement are based on this trigger however, they work just fine.

  • Left
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
    • Conditions
    • Actions
      • Custom script: call ClearTextMessages()
      • Set Map = (Map - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Map Equal to 0
        • Then - Actions
          • Set Map = 4
          • Set TempCamPoint = (Center of Battle Zone 4 <gen>)
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Camera - Set the camera bounds for (Picked player) to Battle Zone 4 <gen>
              • Camera - Pan camera for (Picked player) to TempCamPoint over 0.00 seconds
              • Camera - Rotate camera 360.00 degrees around TempCamPoint for (Picked player) over 60.00 seconds
          • Game - Display to (All players) for 30.00 seconds the text: (PlayerColor[7] + Not Available)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Map Equal to 1
            • Then - Actions
              • Set TempCamPoint = (Center of Battle Zone 1 <gen>)
              • Environment - Set fog to style Linear, z-start 0.00, z-end 7000.00, density 0.50 and color (60.00%, 60.00%, 100.00%)
              • Environment - Change water tinting color to (60.00%, 60.00%, 100.00%) with 0.00% transparency
              • Player Group - Pick every player in (All players) and do (Actions)
                • Loop - Actions
                  • Camera - Set the camera bounds for (Picked player) to Battle Zone 1 <gen>
                  • Camera - Pan camera for (Picked player) to TempCamPoint over 0.00 seconds
                  • Camera - Rotate camera 360.00 degrees around TempCamPoint for (Picked player) over 60.00 seconds
              • Game - Display to (All players) for 30.00 seconds the text: (PlayerColor[7] + Temerai Forest)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Map Equal to 2
                • Then - Actions
                  • Set TempCamPoint = (Center of Battle Zone 2 <gen>)
                  • Player Group - Pick every player in (All players) and do (Actions)
                    • Loop - Actions
                      • Camera - Set the camera bounds for (Picked player) to Battle Zone 2 <gen>
                      • Camera - Pan camera for (Picked player) to TempCamPoint over 0.00 seconds
                      • Camera - Rotate camera 360.00 degrees around TempCamPoint for (Picked player) over 60.00 seconds
                  • Game - Display to (All players) for 30.00 seconds the text: (PlayerColor[7] + Not Available)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Map Equal to 3
                    • Then - Actions
                      • Set TempCamPoint = (Center of Battle Zone 3 <gen>)
                      • Player Group - Pick every player in (All players) and do (Actions)
                        • Loop - Actions
                          • Camera - Set the camera bounds for (Picked player) to Battle Zone 3 <gen>
                          • Camera - Pan camera for (Picked player) to TempCamPoint over 0.00 seconds
                          • Camera - Rotate camera 360.00 degrees around TempCamPoint for (Picked player) over 60.00 seconds
                      • Game - Display to (All players) for 30.00 seconds the text: (PlayerColor[7] + Not Available)
                    • Else - Actions
      • Custom script: call RemoveLocation(udg_TempCamPoint)
So what am I doing wrong in the first trigger?
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
I can't see any problem in here, but I find it a bit strange the way how you change the terrains. Not the method, but the trigger is to much. You can remove the double used actions and place them at the end of the trigger. That would remove some unrequired actions. And maybe it works better then, too

You mean:
  • Camera - Pan camera for (Picked player) to TempCamPoint over 0.00 seconds
  • Camera - Rotate camera 360.00 degrees around TempCamPoint for (Picked player) over 60.00 seconds
Putting it at the end of the trigger right? Just picking the group again, yeh I guess that should be better.
But it does not explain why the first trigger is not doing what I want him to. :p
 
Maybe the script is saved wrong (WE bug, I had this bugs also).
For this, test the map with the Test Map button.
After that, close wc3.

Save the map again.

Close the map in WE and play in wc3 again.

Again close wc3.

Load the map in the WE, save it again and it should work.


If the problem still exists, I don't know what could be wrong then.
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
Maybe the script is saved wrong (WE bug, I had this bugs also).
For this, test the map with the Test Map button.
After that, close wc3.

Save the map again.

Close the map in WE and play in wc3 again.

Again close wc3.

Load the map in the WE, save it again and it should work.


If the problem still exists, I don't know what could be wrong then.

Nope, I'll post the map it's still in a very infant state so I don't have to worry somebody will still it's idea. xD
Maybe you could check it out, I have changed the triggers though, in the end it's going to be a menu.

P.S. Don't mind the name, was to lazy to give it a name.
 

Attachments

  • trh.w3x
    112.4 KB · Views: 38
Nope, I'll post the map it's still in a very infant state so I don't have to worry somebody will still it's idea. xD
Maybe you could check it out, I have changed the triggers though, in the end it's going to be a menu.

P.S. Don't mind the name, was to lazy to give it a name.

I am currently really busy, but I'll look when I have time (or better said, if)
 
Status
Not open for further replies.
Top