revive ability

Status
Not open for further replies.
Level 11
Joined
Dec 5, 2009
Messages
846
Just do like this


  • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Revive
  • Actions
    • Hero - Instantly revive (Target unit of ability being cast) at (Position of (Casting unit)), Show revival graphics
And the ability base it on holy light then you do targets allowed(air ground freind dead)

This is like a resser in wow :)
 
Well, you can make a Channel-based ability, which will not actually target a unit, but it will revive a unit in a small radius of the spell's target location, since dead units cannot be targeted.
  • Trigger
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Revive
  • Actions
    • Set Point1 = (Target point of ability being cast)
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Random 1 units from (Units within 128.00 of (Point1) matching (((Matching unit) is dead) Equal to True) and ((Matching unit) belongs to an ally of (Owner of (Triggering unit)) Equal to True and do (Actions)
      • Loop - Actions
        • Set Point2 = (Position of (Picked unit))
        • Unit - Create 1 (Unit-type of (Picked unit)) for (Owner of (Picked unit)) at Point2 facing default building degrees
        • Custom script: call RemoveLocation (udg_Point2)
    • Custom script: call RemoveLocation (udg_Point1)
 
Level 4
Joined
Dec 12, 2008
Messages
98
you cant target a corpse when its dead so u need to make a grave or something if the unit dies so you can target that
 
Level 11
Joined
Dec 5, 2009
Messages
846
yupp as pharaoh said you need a small radius sry for the other post. I didn't test the trigger^^

But he wanted the ressing unit to spawn next to the caster mb set point 2 position of caster?
 
Level 8
Joined
Jan 20, 2010
Messages
386
i tried

  • Events
  • unit start the efect of an ability
  • Conditions
  • ability equals to revive
  • Actions
  • instantly revive hero (target of ability being cast) at (point of an ability being cast)
using flamestrike as base, but it doenst work


i see paraho's trigger but i think it woudnt bringn the hero with it's level an abilities back, and the owner of the hero might resurrect it on his altar or whatever having other unit more :S
 
And why didn't you follow the trigger I suggested?
You can't have both Target Unit of Ability being cast and Target point of ability being cast at the same time. The Flame Strike is a point-target ability, so it will respond to a point of ability being cast event. If you had a Lightning Strike spell for example, that would get a Target unit of ability being cast event response.
 
Level 8
Joined
Jan 20, 2010
Messages
386
cuz as i said, ur trigger would created a new unit without the lvl and abilities of the revived hero, plus the owner of the unit would still be able of ressurecting the hero via clasic way, so there would be 2 heroes.
This is the only thing that last for the map.
 
Last edited:
Level 3
Joined
Jul 26, 2008
Messages
58
I invented following system long ago, and using it in my ORPG:
When hero dies, he becomes being stored in variable and dying location goes to variables as well. Grave is spawned there. Grave is invulnerable and can be target of some Resurrection spell. After doing that, use 'remove grave from the game' and 'revive (previously stored hero) at (previously stored location)'. Prob could be hard to understand, but fairly easy to use. Ask if you need more exact trigger. Dont forget about clearing leaks!

Bonus suggestion: Also, in my ORPG, grave has the ability which allows the dead hero instantly respawn at the city. Use it.
 
Level 1
Joined
Feb 23, 2010
Messages
5
>Actually, dead units can be targeted if you have a special unit created when that unit dies, and have that spec unit controlled by the player who lost the unit, with a >custom value on the unit set for the unit type to be rezed.
I/E: If Unit type of dying unit is equal to:____ - set custom value of unit type:____ within:____ distance of dying unit to:_____
NOTE: unit custom values are sorted as variables in the map editor!!!
>Then just have the spell only target that specific unit type or have that unit type set as "ward" and have the spell target "wards"
>Then you would have to use more triggers like what i am showing:
I/E: Unit casts spell - Spell type equal to:____ - If custom value of targeted unit is equal to:[number value] - Create unit of type:____ for player:[owner of spell target]
>Repeat as necessary and enjoy!!!
 
Status
Not open for further replies.
Top