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. Vote for the best entries in the 13th Music Contest Poll.
    Dismiss Notice
  7. 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.

Units get hurt 2HP per second when in terrirory {only if they don't possess a tech}

Discussion in 'World Editor Help Zone' started by Koopa124, Apr 7, 2009.

  1. Koopa124

    Koopa124

    Joined:
    Aug 11, 2007
    Messages:
    427
    Resources:
    0
    Resources:
    0
    It works, all units and buildings get hurt 2HP every 2 seconds of the game. What would I need to do so that i someone researched "Endurance" they wouldn't lose HP anymore.


    +Rep for help.
     
  2. BearMachine

    BearMachine

    Joined:
    Mar 11, 2009
    Messages:
    24
    Resources:
    0
    Resources:
    0
    Add a condition to that trigger that does damage checking the integer level of that certain reseach.

    If - research level of endurance equal to 1
    Then -
    Else - reduce health by 2
     
  3. Koopa124

    Koopa124

    Joined:
    Aug 11, 2007
    Messages:
    427
    Resources:
    0
    Resources:
    0
    Where is that found? I've been looking, Endurance is an upgrade, if that changes anything.
     
  4. BearMachine

    BearMachine

    Joined:
    Mar 11, 2009
    Messages:
    24
    Resources:
    0
    Resources:
    0
    Should be under integer conditions i think, lemme see.

    Edit: Condition -> integer -> player - current research level
     
  5. wolfman

    wolfman

    Joined:
    May 31, 2008
    Messages:
    696
    Resources:
    0
    Resources:
    0
    Or you can make an ability called Endurance for the unit and check if it has the buff. I think an ability would make it better but it depends on ur map i guess
     
  6. Koopa124

    Koopa124

    Joined:
    Aug 11, 2007
    Messages:
    427
    Resources:
    0
    Resources:
    0
    Any tips on which "player" to set it to?

    Like, if I make it player 1 red, once red researches it, everyone is fine. I want just red to research it, just red is immune. If blue researches it, just blue is immune.

    Thanks.
     
  7. Technomancer

    Technomancer

    Joined:
    Jan 5, 2007
    Messages:
    282
    Resources:
    10
    Icons:
    9
    Skins:
    1
    Resources:
    10
    You could try this.

    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in YOUR.REGION <gen> matching ((Current research level of Endurance for (Owner of (Matching unit))) Not equal to 1)) and do (Unit - Cause (Picked unit) to damage (Picked unit), dealing 2.00 damage of attack type Chaos and damage type Universal)


    There are almost certainly better, cleaner, more effective ways of doing this, but this is the quick and easy way.
     
  8. Koopa124

    Koopa124

    Joined:
    Aug 11, 2007
    Messages:
    427
    Resources:
    0
    Resources:
    0
    Thanks!
     
  9. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,815
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Technomancer's trigger leaks, I advise not using it and making one simlar that does not leak.
    Group leaks of that size must be avoided at any cost, as those use conciderable memory and will result in noticable slowdowns late game.
     
  10. Technomancer

    Technomancer

    Joined:
    Jan 5, 2007
    Messages:
    282
    Resources:
    10
    Icons:
    9
    Skins:
    1
    Resources:
    10
    Ohp, shi-, Dr Super Good has a valid point. I forgot about leaks. Yeah, it'd be advisable to find a way that doesn't leak. I would imagine it wouldn't be too hard to do though. Well, if you brought in some Jass... sorry, my brain's not working too well at the moment, anybody able to come up with something?
     
  11. wolfman

    wolfman

    Joined:
    May 31, 2008
    Messages:
    696
    Resources:
    0
    Resources:
    0
    Set DamageUnits to units in region matching blah blah
    Pick all units in DamageUnits and damage them
    call RemoveGroup(DamageUnits) <=== I think thats right go to the thread "Things that Leak" to find more about leaks