Complex Trigger lag (Raiding for Ragnarok.)

Discussion in 'World Editor Help' started by Octavia63, Aug 6, 2017.

  1. Octavia63

    Octavia63 Member

    Ratings:
    +0 / 0 / -0
    Think 9 water dungeons where you have to pick which way to go based off where the sun is (each has its own sun). The suns direction changes per region and changes direction in each region at the end of the day. This is to represent the open ocean and the need to use a sun stone. Lets call the main regions region A#s Region #1 spawns sun, sun order command move to region #3 the next day the sun is created in region #2 move to region #4 and this is happening in all the other regions but at different integers. If player goes the direction of the sun and hits the region then he is moved instantly to the next of the 9 (A#s) main regions if wrong back 1. I was able to achieve this mainly by enabling triggers and disabling triggers but after completing the bottom 2 main regions the game became unplayable. What should I do to solve these issues even a link could help as this is an extremely small portion to the game I also wonder if it is 2 much for wc?
    trigers_02.png trigers.png
     
  2. Accname

    Accname 2D-Graphics enthusiast

    Ratings:
    +1,549 / 4 / -4
    If I understand correclty what you are trying to say than this should be trivially easy. You should post your triggers here if you want any actual practical help. You can copy triggers as raw text if you right click the trigger name in the editor window. Then you can paste them here between [ wc3] tags.
     
  3. Octavia63

    Octavia63 Member

    Ratings:
    +0 / 0 / -0
    Trigger:
    • *9
      • CameraMask
        • Events
          • Map initialization
        • Conditions
        • Actions
          • Visibility - Enable fog of war
          • Visibility - Enable black mask
      • [wc3]
      • Camera
        • Events
          • Map initialization
        • Conditions
        • Actions
          • Camera - Set Player 1 (Red)'s camera Distance to target to 2500.00 over 0.00 seconds
      • [wc3]
      • LR
        • Events
          • Time - Every 0.00 seconds of game time
        • Conditions
          • (Number of living The Sun units owned by Neutral Passive) Equal to 0
        • Actions
          • Unit - Create 1 The Sun for Neutral Passive at (Center of l <gen>) facing Default building facing degrees
      • [wc3]
      • LR Copy
        • Events
          • Unit - A unit enters l <gen>
        • Conditions
          • ((Unit-type of (Triggering unit)) is A flying unit) Equal to True
        • Actions
          • Wait 1.00 seconds
          • Unit - Order (Triggering unit) to Move To (Center of r <gen>)
      • [wc3]
      • diableBR
        • Events
          • Unit - A unit enters r <gen>
        • Conditions
          • ((Triggering unit) is A flying unit) Equal to True
        • Actions
          • Unit - Remove (Triggering unit) from the game
          • Trigger - Turn off LR <gen>
          • Trigger - Turn off lrtp <gen>
          • Trigger - Turn off LR Copy <gen>
          • Trigger - Turn on tdtp <gen>
          • Trigger - Turn on TD <gen>
          • Trigger - Turn on TD Copy <gen>
          • Trigger - Turn on diableBR Copy <gen>
          • Trigger - Turn off (This trigger)
      • [wc3]
      • TD
        • Events
          • Time - Every 0.00 seconds of game time
        • Conditions
          • (Number of living The Sun units owned by Neutral Passive) Equal to 0
        • Actions
          • Unit - Create 1 The Sun for Neutral Passive at (Center of t <gen>) facing Default building facing degrees
      • [wc3]
      • TD Copy
        • Events
          • Unit - A unit enters t <gen>
        • Conditions
          • ((Unit-type of (Triggering unit)) is A flying unit) Equal to True
        • Actions
          • Wait 1.00 seconds
          • Unit - Order (Triggering unit) to Move To (Center of b <gen>)
      • [wc3]
      • diableBR Copy
        • Events
          • Unit - A unit enters b <gen>
        • Conditions
          • ((Triggering unit) is A flying unit) Equal to True
        • Actions
          • Unit - Remove (Triggering unit) from the game
          • Trigger - Turn on rltp <gen>
          • Trigger - Turn off TD <gen>
          • Trigger - Turn off tdtp <gen>
          • Trigger - Turn off TD Copy <gen>
          • Trigger - Turn on RL <gen>
          • Trigger - Turn on RL Copy <gen>
          • Trigger - Turn on diableBR Copy 2 <gen>
          • Trigger - Turn off (This trigger)
      • [wc3]
      • RL
        • Events
          • Time - Every 0.00 seconds of game time
        • Conditions
          • (Number of living The Sun units owned by Neutral Passive) Equal to 0
        • Actions
          • Unit - Create 1 The Sun for Neutral Passive at (Center of r <gen>) facing Default building facing degrees
      • [wc3]
      • RL Copy
        • Events
          • Unit - A unit enters r <gen>
        • Conditions
          • ((Unit-type of (Triggering unit)) is A flying unit) Equal to True
        • Actions
          • Wait 1.00 seconds
          • Unit - Order (Triggering unit) to Move To (Center of l <gen>)
      • [wc3]
      • diableBR Copy 2
        • Events
          • Unit - A unit enters l <gen>
        • Conditions
          • ((Triggering unit) is A flying unit) Equal to True
        • Actions
          • Unit - Remove (Triggering unit) from the game
          • Trigger - Turn off RL <gen>
          • Trigger - Turn off rltp <gen>
          • Trigger - Turn off RL Copy <gen>
          • Trigger - Turn on BT <gen>
          • Trigger - Turn on BT Copy <gen>
          • Trigger - Turn on diableBR Copy 3 <gen>
          • Trigger - Turn on bttp <gen>
          • Trigger - Turn off (This trigger)
      • [wc3]
      • BT
        • Events
          • Time - Every 0.00 seconds of game time
        • Conditions
          • (Number of living The Sun units owned by Neutral Passive) Equal to 0
        • Actions
          • Unit - Create 1 The Sun for Neutral Passive at (Center of b <gen>) facing Default building facing degrees
      • [wc3]
      • BT Copy
        • Events
          • Unit - A unit enters b <gen>
        • Conditions
          • ((Unit-type of (Triggering unit)) is A flying unit) Equal to True
        • Actions
          • Wait 1.00 seconds
          • Unit - Order (Triggering unit) to Move To (Center of t <gen>)
      • [wc3]
      • diableBR Copy 3
        • Events
          • Unit - A unit enters t <gen>
        • Conditions
          • ((Triggering unit) is A flying unit) Equal to True
        • Actions
          • Unit - Remove (Triggering unit) from the game
          • Trigger - Turn off BT <gen>
          • Trigger - Turn off BT Copy <gen>
          • Trigger - Turn on LR <gen>
          • Trigger - Turn on lrtp <gen>
          • Trigger - Turn on LR Copy <gen>
          • Trigger - Turn on diableBR <gen>
          • Trigger - Turn off bttp <gen>
          • Trigger - Turn off (This trigger)
      • [wc3]
      • lrtp
        • Events
          • Unit - A unit enters r <gen>
        • Conditions
          • ((Unit-type of (Triggering unit)) is A flying unit) Equal to False
        • Actions
          • Unit - Move (Triggering unit) instantly to (Center of WaterBM <gen>)
      • [wc3]
      • tdtp
        • Events
          • Unit - A unit enters b <gen>
        • Conditions
          • ((Unit-type of (Triggering unit)) is A flying unit) Equal to False
        • Actions
          • Unit - Move (Triggering unit) instantly to (Center of WaterBM <gen>)
      • [wc3]
      • rltp
        • Events
          • Unit - A unit enters l <gen>
        • Conditions
          • ((Unit-type of (Triggering unit)) is A flying unit) Equal to False
        • Actions
          • Unit - Move (Triggering unit) instantly to (Center of WaterBM <gen>)
      • [wc3]
      • bttp
        • Events
          • Unit - A unit enters t <gen>
        • Conditions
          • ((Unit-type of (Triggering unit)) is A flying unit) Equal to False
        • Actions
          • Unit - Move (Triggering unit) instantly to (Center of WaterBM <gen>)
     

    Attached Files:

  4. Octavia63

    Octavia63 Member

    Ratings:
    +0 / 0 / -0
    I am also planning on having up 2 10 players
     
  5. Accname

    Accname 2D-Graphics enthusiast

    Ratings:
    +1,549 / 4 / -4
    Yeah, those triggers are pretty horrible.
    There are several things that need fixing. First of all, a trigger running every 0.00 seconds is always a bad idea. Especially if it isnt doing anything 99.9% of the time. Just wasting performance left and right. Next up you are leaking lots of points there. That means you are using wasting memory which is never freed. As time goes on the amount of leaked memory goes up and up until you run out and things become frustratingly slow. If you want to know more I would suggest doing an online search on "WC3 memory leaks". You should find plenty of sources.

    It is difficult to give you any specific constructive feedback on those triggers. You would need to explain in more detail what you want the trigger to do and why you thought it was a good idea to do it this way.
     
  6. Octavia63

    Octavia63 Member

    Ratings:
    +0 / 0 / -0
    Thank you I just needed the point in the right direction I will do some research.
     

Share This Page