Revive Hero Spell

dyablohunter

New Member
Reaction score
2
I have been trying to make a spell that revives fallen ally heroes for like 6 hours and can't figure out a way to do it.
I tried the trigers but they don't work, haven't tried with integers and variables yet, not very good with those :D.
Any help is wellcome if it reffers to the topic :)
<3 u all.
 
D

DemonSlayeR\

Guest
umm just make a trigger like.

EVENTS
Unit- A unit dies
CONDITIONS
((triggering unit)is a hero) equal to true
(triggering unit) is allied to player one(red) (this is if you want to do teams.)
EVENTS
revive hero instantly at center of region1
 

TheCrystal

New Member
Reaction score
36
Unit-A unit dies
Conditions-Unittype of Triggering unit is a hero equel to true
Dying Unit is ally of Player One.
Action-
Wait 6 hours <W/e>
Set TempPoint=Position of <Unit casting spell>
Revive Triggering unit at TempPoint
Custom Script: Call RemoveLocation (udg_TempPoint)
 

0zaru

Learning vJASS ;)
Reaction score
60
errr please use CODE Tags, :eek:
do not try to copy those two triggers, you will have to do them :p. Also a unit dies won't work with Position of unit casting spell ^^
 

hell_knight

Playing WoW
Reaction score
126
The one I use in my map is somewhat like this
Code:
Rez Copy 2
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) belongs to an ally of Player 7 (Green)) Equal to True
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set dyingunit = (Dying unit)
        Game - Display to (All players) the text: ((Name of (Owner of dyingunit)) + 's hero will be revived in 30 seconds.)
        Wait 30.00 seconds
        Camera - Pan camera for (Owner of dyingunit) to (Center of Town 1 Spawn Point <gen>) over 0.01 seconds
        Wait 0.01 seconds
        Hero - Instantly revive dyingunit at (Center of Town 1 Spawn Point <gen>), Show revival graphics


But I converted to JASS and make it MUI you might want that to or if someone dies and hasnt rezed yet then someone else dies that variable will be overwritten = bad, heres the MUI code anways
Code:
function Trig_Rez_Copy_Conditions takes nothing returns boolean
    if ( not ( IsUnitAlly(GetDyingUnit(), Player(6)) == true ) ) then
        return false
    endif
    if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_Rez_Copy_Actions takes nothing returns nothing
    local unit dyingunit
    set dyingunit = GetDyingUnit()
    call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(dyingunit)) + "'s hero will be revived in 30 seconds." ) )
    call TriggerSleepAction( 30.00 )
    call PanCameraToTimedLocForPlayer( GetOwningPlayer(dyingunit), GetRectCenter(gg_rct_Town_1_Spawn_Point), 0.01 )
    call TriggerSleepAction( 0.01 )
    call ReviveHeroLoc(dyingunit, GetRectCenter(gg_rct_Town_1_Spawn_Point), true )
endfunction
 

hell_knight

Playing WoW
Reaction score
126
Really, where are the leaks in the JASS version, do I need to set Unit = Null also not sure if I need to destroy regions that I will be using over n over..
 

mOoEyThEcOw

New Member
Reaction score
3
I think the poor man just got bombarded with ways to make an auto reviving system... not a spell like he asked for...
 

dyablohunter

New Member
Reaction score
2
Yes indeed, i asked for a spell (ability) to revive an allied hero (something that resembles the Redemption spell in WoW (World of Warcraft) and the answers were not about the topic, but 10x for trying, anyway I found an answer in this topic http://www.thehelper.net/forums/showthread.php?t=52747&highlight=revive+hero
I am going to try it.


Later edit:
Tried it, works, but only works if the owner of the dead hero is the same as the owner of the hero casting the spell, I need it to work only for my allies, also I need it to work only if you are in a custom range from the place where the hero died (say 800-1000), like all the ressurection spells from wow, the range thing is not really necessary, would be great though.

Later edit: "yes, again :D"

I managed to get the spell to rezz my allies but now i have another problem, I have an autorevive system, very simple, triggers only, it works like a charm, but if the player uses the revive spell the rez system continues with the timer countdown and the whole rez trigger and it pans the camera at the rez location, i can destroy the timer window with the name of the reviving player, but the camera still pans at that specific region for that player, how do you stop this trigger:

Code:
Ally Rez
    Events
        Time - Resurrection expires
    Conditions
    Actions
        Countdown Timer - Create a timer window for Resurrection with title (Name of (Triggering player))
        Countdown Timer - Change the color of the title for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 70.00% transparency
        Countdown Timer - Start Resurrection as a One-shot timer that will expire in 25.00 seconds
        Wait 25.00 game-time seconds
        Camera - Apply Alliance Camera <gen> for (Triggering player) over 0.00 seconds
        Hero - Instantly revive (Dying unit) at (Center of Ally Hero Spawn <gen>), Show revival graphics
        Countdown Timer - Destroy (Last created timer window)
?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top