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

Tower gaining an aura after N kills

Discussion in 'World Editor Help Zone' started by Xhorror, Aug 9, 2008.

  1. Xhorror

    Xhorror

    Joined:
    Aug 9, 2008
    Messages:
    2
    Resources:
    0
    Resources:
    0
    I might not be posting in the correct forum but here it goes.

    I've created my own tower defense and playing some TD's like eeveTD and Sprout TD, I've noticed a nice feature. Once a tower reachs a certain amount of kills, it gains an aura/ability of some sorts. I've tried to replicate this using GUI to no avail. Can someone help me with this? Do I need to do this in JASS or can I do it in GUI?

    Any help is appreciated! Thanks :D
     
  2. Hemske

    Hemske

    Joined:
    Mar 23, 2008
    Messages:
    1,568
    Resources:
    58
    Icons:
    56
    Packs:
    1
    Spells:
    1
    Resources:
    58
    • Untitled Trigger 001
      • Events
        • Unit - A unit owned by *Your computer controlling creeps* Dies
      • Conditions
      • (Unit-type of (Killing unit)) Equal to Guard Tower
      • Actions
        • Set Kills_YourTower = (Kills_YourTower + 1)

    • Untitled Trigger 002
      • Events
      • Conditions
        • Kills_YourTower Greater than or equal to 20
      • Actions
        • Unit - Add Brilliance Aura to Guard Tower

    Kills your Tower is a integer variable with initial value 0. And On the trigger nr. 2 is making your tower gaining an aura when your tower has get 20 kills.
     
  3. UreDe4D

    UreDe4D

    Joined:
    Nov 4, 2006
    Messages:
    1,180
    Resources:
    2
    Maps:
    2
    Resources:
    2
    don't forget that you need an event for second trigger, and this would be a lot of work if there are more towers which need this, but i can't think of a better way right now
     
  4. YoshiRyu

    YoshiRyu

    Joined:
    Jun 26, 2007
    Messages:
    686
    Resources:
    0
    Resources:
    0
    it will probably works better this way :
    • Init Guard Tower
      • Events
        • Unit - A unit enters (Entire map)
      • Conditions
        • (Unit-type of (Triggering unit)) Equal to Guard Tower
      • Actions
        • Unit - Set the custom value of (Triggering unit) to 0

    • Guard Tower Kill
      • Events
        • Unit - A unit owned by (Creep Controler) Die
      • Conditions
        • (Unit-type of (Killing unit)) Equal to Guard Tower
      • Actions
        • Unit - Set the custom value of (Killing unit) to ((Custom value of (Killing unit)) + 1)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Custom value of (Killing unit)) Equal to (wanted value)
          • Then - Actions
            • Unit - Add (your aura) to (Killing unit)
          • Else - Actions
     
  5. Xhorror

    Xhorror

    Joined:
    Aug 9, 2008
    Messages:
    2
    Resources:
    0
    Resources:
    0
    thank you for the help :D

    i was wondering what the custom value thing was useful for anyways :p