• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Hero Resurrect

Status
Not open for further replies.
Level 3
Joined
Jul 26, 2008
Messages
58
Hero death:

  • Unit - A unit owned by Player 1 (Red) dies.
  • Set dyingunit1 = (Dying unit)
  • Unit - Create 1 Grave for Player 1 (Red) at (Position of dyingunit1) facing Default building facing (270.0) degrees
  • Unit - Make (Last created unit) Invulnerable
  • Set deadunit1 = (Last created unit)
Resurrection Trigger:

  • Unit - A unit Start the effect of an ability
  • (Ability being cast) Equal to Resurrection
  • (Owner of deadunit1) Equal to Player 1 (Red)
  • (Unit-type of deadunit1) Equal to Grave
  • Hero - Instantly revive dyingunit1 at (Position of deadunit1), Show revival graphics
  • Remove deadunit1 from the game
All is seems to be ok, but that Grave i've spawned never can be destroyed. If i manually kill it, theres immidiatly appearing another one.. What i should fix?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
For starters, add

  • ((Dying unit) is A Hero) Equal to True
as a condition to the hero death trigger.

Other than that, I don't know what's the problem. You set the grave to be invulnerable, so units can't destroy it. What do you mean by manually killing it?

I tested the trigger by killing a hero, and spawning a footman upon death, and reviving occuring when Blink ability is used. It works fine.
 
Level 9
Joined
Jun 7, 2008
Messages
440
You also have to remove the leaks.
  • Events
    • Unit - a unit owned by Player 1 (red) dies
  • Conditions
    • Dying unit is a (hero) equal to true
  • Actions
    • Set dyingunit1= (dying unit)
    • Set temploc = position of dyingunit1
    • Unit - create 1 graveyard for owner of dyingunit1 at temploc facing Default building facing (270.0) degrees
    • Custom script: call RemoveLocation(udg_temploc)
And then you need to do it again for deadunit1. I don't see anything wrong with the trigger itself. Unless you got a conflicting one. that uses the same unit-type
 
Level 3
Joined
Jul 26, 2008
Messages
58
For starters, add

  • ((Dying unit) is A Hero) Equal to True

Guys, i know about that, and i know about leaks. But now i have problems with Grave, i need to fix it. I'll try to set as "Triggering unit" (why? o_O) and try to change unit "Grave".
Manually killed - i just removed invulnerablity

I understood how dumb was i :X
  • ((Dying unit) is A Hero) Equal to True
ofc it MUST be there, cuz grave can spawn another one grave, right?
But.. Grave still doesnt want to remove. But when i kill it, it disappears.
So still need help with its triggered removing.
 
Last edited by a moderator:
Level 3
Joined
Jul 26, 2008
Messages
58
Because you kill a unit which will fire the trigger again, thats why you must add condition so that every time the 'Graveyard' is killed the trigger fires again and create another 'Grave'.

Look at my prev post :)
Else, i thought problem was in my base unit - Phoenix' egg. But i changed it into farm and got no effect..
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
Look at my prev post :)
Else, i thought problem was in my base unit - Phoenix' egg. But i changed it into farm and got no effect..

Yes I know I wrote it then I found you post in front of me.

And as for your problem removing the grave 'Remove deadpoint 1 from the game' works right IF the first "Grave" hasn't destroyed; deadpoint 1 will refer to a dead unit if the first Grave was destroyed.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
So, there is no way to REMOVE the grave?
I don't know but Remove UNIT from the game is supposed to work perfectly. May be the problem is in the variable that it is not refering to the Grave.

Ok, try displaying a msg that tells of the type of the unit deadpoint 1 variable is refering to and see if the problem is in the variable or other.
 
Level 3
Joined
Jul 26, 2008
Messages
58
I dont think so.. I tried to change variable "deadunit1" to "Target of the ability being cast", got the same problem.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
I dont think so.. I tried to change variable "deadunit1" to "Target of the ability being cast", got the same problem.

No, set deadunit 1 = Last Created Unit (which will be the grave)

Then when someone cast resurection remove deadunit 1 from the game, whats wrong with that ?!!!

Try it again and check your variables correctly and if it doesn't work tell me so I could try and code it myself.
 
Level 3
Joined
Jul 26, 2008
Messages
58
Dying Unit says itself, your trigger has a Unit Dies, the Dying Unit, is for the unit who is about to die, Event Response - Triggering Unit will be set of to the one who completes your event

But all is ok with dying unit trigger, something wrong only with spawned unit..
And all is ok with variables, as i can see...
 
Last edited:
Level 3
Joined
Jul 26, 2008
Messages
58
I used that fuction, and, true, all worked fine.. I dont know what happened now.
Anyway, wish you luck with my problem :)

-nothing here-
 
Last edited by a moderator:
Level 3
Joined
Jul 26, 2008
Messages
58
It wont work, cuz grave must stay as long as dead hero will be resurrected by someone, or player clicks the button to revive at town
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
-nothing here-

Sorry I got distracted but I'll work on it.

It works very fine for me and here is the triggers.

  • Unit Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Set DeadUnit = (Triggering unit)
      • Set DeathPoint = (Position of DeadUnit)
      • Unit - Create 1 Grave for (Owner of DeadUnit) at DeathPoint facing 270.00 degrees
      • Set Grave = (Last created unit)
  • Revive
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Resurrection
    • Actions
      • Hero - Instantly revive DeadUnit at DeathPoint, Show revival graphics
      • Unit - Remove Grave from the game
Remove the leaks by yourself.

Variables:
- DeadUnit, Grave > Units
- DeathPoint > Point

Grave in Create 1 Grave for ... is a dummy unit.

(Owner of (Triggering unit)) Equal to Player 1 (Red) change this cond. as you see fit but note that without a condition every unit will die will cause the triggers to fire a ruin everything.
 
Last edited by a moderator:
Level 3
Joined
Jul 26, 2008
Messages
58
I fixed my trigger many times and now this is really increadible.
I created excatly ur trigger, and all works fine.
But.. Then i looked at my trigger... Result: ABSOLUTELY same triggers, except variables names. So what the *bad word* is that?.. =|
P.S. And i even dont know what means GUI, MUI or others, i never learnt anything about wc3editor =D
Anyway, Starquizer, big thanks to you.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
P.S. And i even dont know what means GUI, MUI or others, i never learnt anything about wc3editor =D
Anyway, Starquizer, big thanks to you.

There are tutorials to learn more about the editor.
MUI stands for Multi-Unit Instancible; it is what makes the spell cast at any time by more than one unit without any bugs

GUI is the normal triggers in the editor, there is JASS its more advanced than GUI but can do more miracles than GUI.
 
Level 3
Joined
Jul 26, 2008
Messages
58
Uhm.. Im not enough good in english, so it will be hard, but, guess, i still need to learn about MUI, cuz i need to duplicate such triggers for 8players usage. Ty for the advice.
 
Level 3
Joined
Jul 26, 2008
Messages
58
Can anyone do that trigger at MUI please? Remove the leaks, make this trigger correctly work for 8 players and so on, so i hope i can do the same just at one example.
 
Level 3
Joined
Jul 26, 2008
Messages
58
Yea, Slaydon is right, only for heroes :)
Theres res system - you can be resurrected by some spell, or you can just revive urself at town.
Actually creating dialog like "x wants to ressurect you, do you accept?| yes/no" will be nice, but its not neccesarry.
 
Level 3
Joined
Jul 26, 2008
Messages
58
I got PC crash at first, and i have no idead about MUI at seconds.
I asked to make this trigger in MUI for 8 players without leaks, so i can make another ones just at this example.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
I got PC crash at first, and i have no idead about MUI at seconds.
I asked to make this trigger in MUI for 8 players without leaks, so i can make another ones just at this example.

The best thing to learn is to try it yourself and post your triggers here and discuss it but if we make to you a complete example you will not learn anything.

I was once like you when I was trying to make a spell with vJASS and asked for a step-by-step help, then Element of Water told that I should try it myself and I am telling you when you make it on your own is much better.

Still, if you insists that one make it for you then so be it.
 
Level 3
Joined
Jul 26, 2008
Messages
58
I asked to make 1 trigger for me, and i supposed to learn how i can do _that type_ MUI-triggers. At the time, i dont interested at anothers, cuz i havent got much time for learning all-about.
 
Level 3
Joined
Jul 26, 2008
Messages
58
Invulnerable. I also did the one possible "Ressurect" target - Invulnerables :)
Grave can be target of "Ressurect" and it has ability "Revive at altar", which revives dead hero at town.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
Invulnerable. I also did the one possible "Ressurect" target - Invulnerables :)
Grave can be target of "Ressurect" and it has ability "Revive at altar", which revives dead hero at town.
No grave are just a mere unit to indicate the location of death the hero will be stored in a variable and when you click the resurect button it will revive that hero and remove the grave.
 
Level 3
Joined
Jul 26, 2008
Messages
58
Hm.. Actually, i did that Grave can be target of "Ressurect", so revives the hero in that way, AND grave has an ability to resurrect dead hero at town, is that hard or smth?
 
Status
Not open for further replies.
Top