1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    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.

Resurrecting Heroes

Discussion in 'World Editor Help Zone' started by Spectre4802, Apr 14, 2009.

  1. jadegolem

    jadegolem

    Joined:
    Feb 1, 2008
    Messages:
    293
    Resources:
    0
    Resources:
    0
    theres an action in units called Move Unit
     
  2. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,776
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Did you read the previous posts, or do you only read the first post and then reply?

     
  3. Cov3r70ps

    Cov3r70ps

    Joined:
    Jun 8, 2007
    Messages:
    89
    Resources:
    0
    Resources:
    0
    To be fair, I think he might be referring to how to unhide the unit.

    • Unit - Unhide (Triggering unit)
     
  4. ALiEN95

    ALiEN95

    Joined:
    Mar 4, 2009
    Messages:
    1,148
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Everything is possible in we :)..You can make corpse
    lets say you have a hero called "Rambo"
    than you make unit (with no attack and invulnerable) and you can call him "Rambo´s corpse"
    He must not have a model file ,click on model file holding shift+enter and clear everything accept ".mdl"
    now unit "Rambo´s corpse will be invisible and unable to be selected
    Make that unit flying

    There is an ability called "Spawn Hydra" but u make it spawn unit type "Rambo´s corpse" and give that ability to "Rambo"

    • Untitled Trigger 008
      • Events
        • Unit - A unit Dies
      • Conditions
        • (Unit-type of (Dying unit)) Equal to Rambo´s Corpse
      • Actions
        • Set POSITION = (Position of (Dying unit))
        • Hero - Instantly revive (Random unit from (Units owned by (Owner of (Dying unit)) of type Small Rambo)) at POSITION, Hide revival graphics
        • Custom script: call RemoveLocation(udg_POSITION)


    • duble hero
      • Events
        • Unit - A unit Finishes casting an ability
      • Conditions
        • (Ability being cast) Equal to YOUR ABILITY
      • Actions
        • Set FIXLAGS = (Position of (Casting unit))
        • Set UNITGROUP = (Units within 512.00 of FIXLAGS matching (((Matching unit) is A flying unit) Equal to True))
        • Unit Group - Pick every unit in (Units in UNITGROUP) and do (Actions)
          • Loop - Actions
            • Unit - Kill (Picked unit)
        • Custom script: call RemoveLocation(udg_FIXLAGS)
        • Custom script: call DestroyGroup(udg_UNITGROUP)
     
  5. Toilet Maker

    Toilet Maker

    Joined:
    Apr 25, 2008
    Messages:
    75
    Resources:
    0
    Resources:
    0
    Here, try this system.

    (Use the manual attack to kill the mountain king)

    WARNING: I do not know if it leaks, I am not good with leaks so be careful. If it does leak it shouldn't be too hard to fix.

    Good Luck with your map and all.

    (I did throw this together in a couple of mins while waiting for an answer to my own thread so instead of a wisp use something like a visible shade or tombstone and also remove the movement of this unit)
     

    Attached Files:

  6. Spectre4802

    Spectre4802

    Joined:
    Jan 6, 2009
    Messages:
    99
    Resources:
    0
    Resources:
    0
    Interesting idea, Toilet Maker.

    Interesting indeed.
     
  7. mikeaadams

    mikeaadams

    Joined:
    Mar 25, 2008
    Messages:
    5
    Resources:
    0
    Resources:
    0
    I made an RPG and I used revival stones at certain points in the game and If a unit enters a region near the stone the dying unit will instantly revive at that point.
     
  8. ALiEN95

    ALiEN95

    Joined:
    Mar 4, 2009
    Messages:
    1,148
    Resources:
    1
    Spells:
    1
    Resources:
    1
    unit begins casting an ability - raise dead heros in range

    pick every unit that is a hero and is not alive
    -revive picked unit
    >if distance between picked unit and casting unit is greather than <1000>
    than
    kill picked unit

    (it revives all heros around 1000 range of casting unit)

    if you think this could be a good idea i will solve the hero death massages so they dont appear when you kill a hero with this trigger
     
  9. Toilet Maker

    Toilet Maker

    Joined:
    Apr 25, 2008
    Messages:
    75
    Resources:
    0
    Resources:
    0
    Hey ALiEN, sorry to disappoint you but I beat you to it and solved this problem 4-5 months ago :p 3 posts up I think. But I guess that it's a little different with mine only resurrecting the target hero whereas yours resurrect everyone in 1000 radius.

    Also, can't you do the opposite and only conditionally pick heroes within 1000 radius because right now it resurrects every hero then kills them all unless nearby. Also this will waste mana if accidental cast and also need to fix so doesn't revive enemies. Other than that I guess it works :)
     
  10. ALiEN95

    ALiEN95

    Joined:
    Mar 4, 2009
    Messages:
    1,148
    Resources:
    1
    Spells:
    1
    Resources:
    1
    I couldn´t revive heroes around range for some reason,i did some mistake and i didnt see it...

    >revive heroes within range

    its just needed to pick every hero within (some range) of casting unit and revive picked unit

    >revive targeted hero

    unit begins casting an ability (ability that needs unit target or point target)

    ability being cast equal to revive hero

    revive rendom unit from (units within 100 range of target point of ability being cast) matching,matching unit is a hero...



    when hero dies just create a wishp to know where it died

    or better if it is possible to pause his animation when he dies so that he lies on the ground
     
  11. adsf123

    adsf123

    Joined:
    Mar 25, 2008
    Messages:
    56
    Resources:
    0
    Resources:
    0
    okay i know this is long ago but ive tried your trigger and it works fine but how to i set a cooldown for my skill? when it casts there isnt any cooldown
     
  12. Visimirsit

    Visimirsit

    Joined:
    Aug 28, 2009
    Messages:
    52
    Resources:
    0
    Resources:
    0
    Toilet maker's idea is awesome :) i would make the wisp looking like a grave and that he couldnt move so when you run around se a dead hero you can ressurect him :) cool cool plus rep for him
     
  13. adsf123

    adsf123

    Joined:
    Mar 25, 2008
    Messages:
    56
    Resources:
    0
    Resources:
    0
    oh btw i found another loophole, the rez spell only can be targetted at the most recent "soul" created and it wont rez any previous dead heroes
     
  14. Toilet Maker

    Toilet Maker

    Joined:
    Apr 25, 2008
    Messages:
    75
    Resources:
    0
    Resources:
    0
    Alright, I haven't been on Warcraft 3/Editor or Hive for a while but I'll try to help you anyway.
    To set a cooldown go to your Object Editor and find your Resurrection spell and look for a parameter called: "Stats - Cooldown" Just change that to whatever you want. You can also change other things here if you need to such as animation (Special Effect-like things that occur when you use this spell), Mana Cost, Cast Range, Name and Tooltips. If you want more information look for a tutorial on the Object Editor.

    Now in regards to the above;
    I did put this together in about 10 minutes and I intended it for an RPG which I assumed had only 1 hero per player. It will work for the last killed hero of that player. You can change this to only work on your "main" hero (ie. you have a secondary/less important hero in your map) by adding conditions such as:
    • (Dying unit) Equal to MAIN_HERO[(Player number of (Owner of (Dying unit)))]


    Now if you have 2 "main" heroes for each player it gets a little sticky. I'm not in the mood for making a simple an efficient system at present but I will throw together a crude one for you:
    Trigger:

    • Dies
      • Events
        • Unit - A unit Dies
      • Conditions
        • ((Dying unit) is A Hero) Equal to True
        • ((Owner of (Dying unit)) controller) Equal to User
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Dying unit) Equal to MAIN_HERO1[(Player number of (Owner of (Dying unit)))]
          • Then - Actions
            • Unit - Create 1 Wisp for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
            • Set WISP1[(Player number of (Owner of (Dying unit)))] = (Last created unit)
            • Set MAIN_HERO1[(Player number of (Owner of (Dying unit)))] = (Dying unit)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Dying unit) Equal to MAIN_HERO2[(Player number of (Owner of (Dying unit)))]
              • Then - Actions
                • Unit - Create 1 Wisp for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
                • Set WISP2[(Player number of (Owner of (Dying unit)))] = (Last created unit)
                • Set MAIN_HERO2[(Player number of (Owner of (Dying unit)))] = (Dying unit)
              • Else - Actions

    • Ressurect
      • Events
        • Unit - A unit Begins casting an ability
      • Conditions
        • And - All (Conditions) are true
          • Conditions
            • (Unit-type of (Target unit of ability being cast)) Equal to Wisp
            • (Ability being cast) Equal to RESSERUCT
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Target unit of ability being cast) Equal to WISP1[(Player number of (Owner of (Target unit of ability being cast)))]
          • Then - Actions
            • Hero - Instantly revive MAIN_HERO1[(Player number of (Owner of (Target unit of ability being cast)))] at (Position of (Target unit of ability being cast)), Show revival graphics
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Target unit of ability being cast) Equal to WISP2[(Player number of (Owner of (Target unit of ability being cast)))]
          • Then - Actions
            • Hero - Instantly revive MAIN_HERO2[(Player number of (Owner of (Target unit of ability being cast)))] at (Position of (Target unit of ability being cast)), Show revival graphics
          • Else - Actions
        • Unit - Remove (Target unit of ability being cast) from the game


    Hope that helps you. I strongly advise you mess around with triggers and look up tutorials especially on variables and arrays so that you can understand this and do it yourself.

    Good Luck!
    -TM
     
  15. adsf123

    adsf123

    Joined:
    Mar 25, 2008
    Messages:
    56
    Resources:
    0
    Resources:
    0
    hey man thanks for your quick reply, i know about the object editor thing but due to the trigger saying begins casting an ability, the cooldown and mana costs do not take effect, if im not wrong there must be a line to end this trigger and let the spell resume but im not sure what