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. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    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.

[Trigger] My trigger have memory leak?

Discussion in 'Triggers & Scripts' started by narutoj, Nov 4, 2007.

  1. narutoj

    narutoj

    Joined:
    Apr 22, 2007
    Messages:
    16
    Resources:
    0
    Resources:
    0
    Events
    Every 15.00 seconds of game time

    Conditions

    Actions
    Unit Group - Pick every unit in (Units owned by Hostile) and do (Actions)
    Loop actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Percentage life of (Picked unit)) Equal 50.00

    Then - Actions
    Custom script: set by_wantDestroyGroup = true
    Set horo_go_fight = (Random point in (playable map area))
    unit - Order (Picked unit) to attack to move horo_go_fight
    Custom script: call RemoveLocation(udg_horo_go_fight)

    Else - Actions
    Do nothing
    Custom script: call RemoveLocation(udg_horo_go_fight)
     
  2. DenZel94

    DenZel94

    Joined:
    Jun 4, 2006
    Messages:
    127
    Resources:
    5
    Maps:
    3
    Tutorials:
    2
    Resources:
    5
    Thats

    • Poop
      • Events
        • Time - Every 15.00 seconds of the game
      • Conditions
      • Actions
        • Custom script: set bj_wantDestroyGroup
        • Unit Group - Pick every unit in (units owned by (Hostile)) and do (Actions)
          • Loop - Actions
            • If (All conditions) are true then do (Actions), else do (Else Actions)
              • If - Conditions
                • (Percentage Life of (Picked Unit)) LESS THAN or equal to 50.00
              • Then - Actions
                • Set horo_go_fight = (Random point in (Playable Map Area))
                • Unit - Order (Picked unit) to attack-move to horo_go_fight
                • Custom script: call RemoveLocation(udg_horo_go_fight)
              • Else - Actions
                • Custom script: call RemoveLocation(udg_horo_go_fight)


    Just a question..

    If you intended the condition to ONLY be 50.00 percent, then it will only occur WHEN his life is 50.00% but not (and less) or (and greater)
     
  3. narutoj

    narutoj

    Joined:
    Apr 22, 2007
    Messages:
    16
    Resources:
    0
    Resources:
    0
    If i use Less than or equal 50.00 will memory leaks?
    because this trigger not for one unit (about 20~50 units).
     
  4. DenZel94

    DenZel94

    Joined:
    Jun 4, 2006
    Messages:
    127
    Resources:
    5
    Maps:
    3
    Tutorials:
    2
    Resources:
    5
    No it will not, the only thing that will create leaks are points(call RemoveLocation), both unit and player groups(call DestroyForce/Group or set bj_wantDestroyGroup = true ~ for UG only) and some things that I have already forgotten (due to the fact that I quit mapping from June until now..)
     
  5. narutoj

    narutoj

    Joined:
    Apr 22, 2007
    Messages:
    16
    Resources:
    0
    Resources:
    0
    thank's your help!