how to create an passiv absorb ability

Status
Not open for further replies.
Guys can you teach me how to make a passiv absorb ability,that ability exsist in the map "omg 1.9d(oh my god 1.9d)"all i know about the ability is when the hero kills an not mehanical,building,...units then the ability does absorb the cropse from the ground and gives the hero perm. bonus stats like more damage and hp. and i know that ability have something to do with triggers but i don't know how pls help me guys?
 
Level 9
Joined
May 21, 2014
Messages
580
Make an icon just for the purpose of seeing the skill.

You have to trigger this.

First of all, you need to check for dead units around the user within a certain range. How you do this is up to you since it isn't specific enough. Then when it detects the corpse, remove the corpse from game then add the attributes of the Hero using Hero - Modify.
 
Level 19
Joined
Oct 7, 2014
Messages
2,209
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Hero = (Killing unit)
      • Set DyingUnit = (Dying unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of Hero) Equal to YourHero
          • (DyingUnit is A structure) Equal to False
          • (DyingUnit is Mechanical) Equal to False
        • Then - Actions
          • Hero - Modify Strength of Hero: Add 10
          • Hero - Modify Agility of Hero: Add 10
          • Hero - Modify Intelligence of Hero: Add 10
          • Unit - Set life of Hero to ((Life of (Hero)) + 100.00)
          • Unit - Set mana of Hero to ((Mana of (Hero)) + 100.00)
        • Else - Actions
 
Level 9
Joined
May 21, 2014
Messages
580
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Hero = (Killing unit)
      • Set DyingUnit = (Dying unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of Hero) Equal to YourHero
          • (DyingUnit is A structure) Equal to False
          • (DyingUnit is Mechanical) Equal to False
        • Then - Actions
          • Hero - Modify Strength of Hero: Add 10
          • Hero - Modify Agility of Hero: Add 10
          • Hero - Modify Intelligence of Hero: Add 10
          • Unit - Set life of Hero to ((Life of (Hero)) + 100.00)
          • Unit - Set mana of Hero to ((Mana of (Hero)) + 100.00)
        • Else - Actions

This works, but then again the corpse isn't generated yet, but the unit is gone already.
 
Level 19
Joined
Oct 7, 2014
Messages
2,209
Then add this
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Hero = (Killing unit)
      • Set Owner = (Owner of Hero)
      • Set DyingUnit = (Dying unit)
      • Set DyingUnitPoint = (Position of DyingUnit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of Hero) Equal to YourHero
          • (DyingUnit is A structure) Equal to False
          • (DyingUnit is Mechanical) Equal to False
        • Then - Actions
          • Unit - Create a DyingUnit corpse for Owner at DyingUnitPoint
          • Hero - Modify Strength of Hero: Add 10
          • Hero - Modify Agility of Hero: Add 10
          • Hero - Modify Intelligence of Hero: Add 10
          • Unit - Set life of Hero to ((Life of (Hero)) + 100.00)
          • Unit - Set mana of Hero to ((Mana of (Hero)) + 100.00)
          • Unit - Remove DyingUnit from the game
        • Else - Actions
        • Custom script: call RemoveLocation(udg_DyingUnitPoint)
 
Level 9
Joined
May 21, 2014
Messages
580
Then add this
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Hero = (Killing unit)
      • Set Owner = (Owner of Hero)
      • Set DyingUnit = (Dying unit)
      • Set DyingUnitPoint = (Position of DyingUnit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of Hero) Equal to YourHero
          • (DyingUnit is A structure) Equal to False
          • (DyingUnit is Mechanical) Equal to False
        • Then - Actions
          • Unit - Create a DyingUnit corpse for Owner at DyingUnitPoint
          • Hero - Modify Strength of Hero: Add 10
          • Hero - Modify Agility of Hero: Add 10
          • Hero - Modify Intelligence of Hero: Add 10
          • Unit - Set life of Hero to ((Life of (Hero)) + 100.00)
          • Unit - Set mana of Hero to ((Mana of (Hero)) + 100.00)
          • Unit - Remove DyingUnit from the game
        • Else - Actions
        • Custom script: call RemoveLocation(udg_DyingUnitPoint)

This could work as well, but as I understand from what he said, the corpse is absorbed.
 
Level 9
Joined
May 21, 2014
Messages
580
I tried the trigger. It works, but it could use some improvement. It looks weird when the hero stat is already modified when the unit just died. To add to that, the corpse generation doesn't even have animation, and that the corpse cannot be seen anymore because of the execution of the trigger.
 
Status
Not open for further replies.
Top