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. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. 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.

Buff problem

Discussion in 'World Editor Help Zone' started by daniel91, Sep 20, 2013.

  1. daniel91

    daniel91

    Joined:
    Jan 13, 2008
    Messages:
    95
    Resources:
    0
    Resources:
    0
    i have this:

    • Unit - A unit starts an effect of an ability
    • Conditions - Ability being cast equal to Inner fire
    • Actions - hero - modify strength of (target unit being ability being cast: add 10
    • if - triggering unit has buff inner fire equal to true
    • Then - Hero modify strength of (taget unit of ability being cast):substract 10


    I dont know how to do it when it finish to give back original strength. Like my hero get 10 strength, i add that buf which means my hero will have 20, and when inner fire is done that 10 strength to dissapear. Help please!
     
  2. jakeZinc

    jakeZinc

    Joined:
    Aug 13, 2013
    Messages:
    1,406
    Resources:
    20
    Spells:
    20
    Resources:
    20
    attach the map I can help you with this ^^.

    EDIT:

    It is not a buff problem XD.
     
  3. daniel91

    daniel91

    Joined:
    Jan 13, 2008
    Messages:
    95
    Resources:
    0
    Resources:
    0
    ....
     

    Attached Files:

  4. jakeZinc

    jakeZinc

    Joined:
    Aug 13, 2013
    Messages:
    1,406
    Resources:
    20
    Spells:
    20
    Resources:
    20
    Wait after 5 minutes
     
  5. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,948
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    LOL
    you should check when your buff's duration has ended then substract hero's strength
    that's all
     
  6. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Add the target into a unit group. Pick all units in the group once per second. If the unit does no have a buff, remove it from the group and subtract strength. Turn the trigger off if the group is empty.
     
  7. jakeZinc

    jakeZinc

    Joined:
    Aug 13, 2013
    Messages:
    1,406
    Resources:
    20
    Spells:
    20
    Resources:
    20
    here
     

    Attached Files:

  8. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,948
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    this is what does maker mean
    Cast Trigger
    • Inner Fire Cast
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Inner Fire
      • Actions
        • Set TempUnit = (Target unit of ability being cast)
        • Hero - Modify Strength of TempUnit: Add 10
        • Unit Group - Add TempUnit to TempGroup
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (TempGroup is empty) Equal to False
          • Then - Actions
            • Trigger - Turn on Inner Fire Check <gen>
          • Else - Actions


    Loop Trigger
    • Inner Fire Check
      • Events
        • Time - Every 1.00 seconds of game time
      • Conditions
      • Actions
        • Unit Group - Pick every unit in TempGroup and do (Actions)
          • Loop - Actions
            • Set TempUnit = (Picked unit)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (TempUnit has buff Inner Fire) Equal to False
              • Then - Actions
                • Unit Group - Remove TempUnit from TempGroup
                • Hero - Modify Strength of TempUnit: Subtract 10
              • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (TempGroup is empty) Equal to True
          • Then - Actions
            • Trigger - Turn off (This trigger)
          • Else - Actions
        • Set TempUnit = No Unit
     
    Last edited: Sep 21, 2013
  9. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Yes but every 0.03 seconds is way too often for this. Once per second should be enough.
     
  10. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,948
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    okay, fixed
     
  11. Mythic

    Mythic

    Media Manager

    Joined:
    Apr 24, 2012
    Messages:
    7,877
    Resources:
    107
    Models:
    91
    Icons:
    5
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    107
    @Rheiko
    a.) You could have used Mag's wait indexing style
    b.) You don't add 10 STR to the target at cast
    c.) Null TempUnit, leaks some bytes every time
     
  12. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,948
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    using wait is not recommended

    will do (forgot to add 'em)

    to make sure, i have to ask professionals.
    Awaiting Answer
     
  13. jakeZinc

    jakeZinc

    Joined:
    Aug 13, 2013
    Messages:
    1,406
    Resources:
    20
    Spells:
    20
    Resources:
    20
    Hmm??
     
  14. pOke

    pOke

    Joined:
    Mar 24, 2013
    Messages:
    1,104
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I think Wrathion is not refering to waits but to an indexed counter as a pseudo wait. I'm not sure if it's much better, it just avoids the use of a unit group which some might view as beneficial, and a better practice.

    As to nulling globals I have heard mixed responses, I doubt it would hurt but seems unlikely to add or subtract much.
     
  15. jakeZinc

    jakeZinc

    Joined:
    Aug 13, 2013
    Messages:
    1,406
    Resources:
    20
    Spells:
    20
    Resources:
    20
    It is like Reading Index and Listener Index with wait Right??? It is from the tutorial of Mag.
     
  16. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Yes it does leak but only really really little. So little you don't have to worry about it, but you can null it to prevent it.
     
  17. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,948
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    thanks, maker

    fixed: add 10 strength
    Maker, where should i null it? i'm a bit confused
     
  18. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    After using it the last time in the trigger. You can null it at the end of the trigger.
     
  19. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,948
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    like that?
     
  20. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Yeah.