1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Help with a trigger

Discussion in 'World Editor Help Zone' started by Qrom Bellascream, May 9, 2017.

  1. Qrom Bellascream

    Qrom Bellascream

    Joined:
    Apr 5, 2013
    Messages:
    150
    Resources:
    0
    Resources:
    0
    • StartIron
      • Events
        • Time - Every 0.01 seconds of game time
      • Conditions
      • Actions
        • Unit - Create 1 Iron for Player 12 (Brown) at (Random point in (Playable map area)) facing Default building facing degrees
        • Unit - Create 1 Iron (Circle) for Player 12 (Brown) at ((Position of (Last created unit)) offset by 150.00 towards (Real(Degrees[(Random integer number between 0 and 4)])) degrees) facing Default building facing degrees


    This trigger is used to generate random ores on the map which is completely flat. But for some reason, the circle of power that spawns next to is not always 150 units away, sometimes it's almost fully inside the ore, and sometimes farther away from the ore than usual. What gives?
     
  2. Abovegame

    Abovegame

    Joined:
    Jan 2, 2016
    Messages:
    466
    Resources:
    1
    Maps:
    1
    Resources:
    1
    According to your trigger it shoud work as you intended. Besides that change your trigger a bit adding these:

    • StartIron
      • Events
        • Time - Every 0.01 seconds of game time
      • Conditions
      • Actions
        • Set Reg1 = Random point in (Playable map area)
        • Unit - Create 1 Iron for Player 12 (Brown) at Reg1 facing Default building facing degrees
        • Unit - Create 1 Iron (Circle) for Player 12 (Brown) at (Reg1 offset by 150.00 towards (Real(Degrees[(Random integer number between 0 and 4)])) degrees) facing Default building facing degrees
        • Custom scripts - call RemoveLocation(udg_Reg1)


    Your map will start lagging if you don't remove the leaks.The modification i've made removes the leaks.
     
  3. Qrom Bellascream

    Qrom Bellascream

    Joined:
    Apr 5, 2013
    Messages:
    150
    Resources:
    0
    Resources:
    0
    Ohh yeah, thanks for that
     
  4. ZiBitheWand3r3r

    ZiBitheWand3r3r

    Joined:
    Nov 21, 2012
    Messages:
    908
    Resources:
    15
    Maps:
    7
    Spells:
    8
    Resources:
    15
    use unit-based circle, not building
     
  5. Kaijyuu

    Kaijyuu

    Joined:
    Jun 2, 2004
    Messages:
    848
    Resources:
    0
    Resources:
    0
    There's still an additional leak (point offset by angle creates another point).

    As for why they move, it might be collision. Make sure the iron and the circle aren't buildings, have no collision, have pathing type set to none, and are given the Ghost - Visible ability.