• 🏆 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!

Heroes abilities broken after triggered ressurrect.

Status
Not open for further replies.
Level 9
Joined
Sep 8, 2004
Messages
633
Hey people! I'm working on a map that uses heroes which can be resurrected by other players.

The heroes are the same for each player; each has four abilities:
1) Build (it's a builder/repairer)
2) Sentinel (Like the nightelves)
3) Divine Shield (Human Paladin)
4) Wind walk (Orc Blademaster)

The problem that occurs when I trigger a hero back to life with (Hero - Revive (Instantly)) is that abilities 3 and 4 no longer work. Not when clicked nor when using the hotkey. I've already tried a workaround by un - and - relearning the abilities, no avail. I've tried making them unit abilities instead of hero - no avail.

Has anyone encountered this before and found a solution?
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
We can take a good look at it when you post the Divine Shield trigger (if there is one), the Wind Walk trigger (if there is one) and the trigger that revives the hero.

PS: Since it's a hero that you're reviving, you should keep them as Hero Abilities :wink:
But that'll won't solve the problem since you changed it from Hero to Unit Ability.
 
Level 9
Joined
Sep 8, 2004
Messages
633
  • Unit Finish Casting
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Resurrection
        • Then - Actions
          • Set Int_Temp = 0
          • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Burial Site)) and do (Actions)
            • Loop - Actions
              • Set Int_Foundersingame = (Int_Foundersingame + 1)
              • Set Boo_Founderdead[(Player number of (Owner of (Picked unit)))] = False
              • Set Point_Temp = (Position of (Picked unit))
              • Hero - Instantly revive Unit_Founder[(Player number of (Owner of (Picked unit)))] at Point_Temp, Show revival graphics
              • Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Picked unit))) + has been ressurrected!)
              • Cinematic - Ping minimap for (All players) at Point_Temp for 3.00 seconds
              • Unit - Remove Unit_Burialsite[(Player number of (Owner of (Picked unit)))] from the game
              • Set Int_Temp = (Int_Temp + 1)
              • Set Unit_Camfocus_Player[(Player number of (Owner of (Picked unit)))] = Unit_Founder[(Player number of (Owner of (Picked unit)))]
              • Camera - Lock camera target for Player[(Player number of (Owner of (Picked unit)))] to Unit_Camfocus_Player[(Player number of (Owner of (Picked unit)))], offset by (0.00, 0.00) using Default rotation
          • Player - Add (Int_Temp x 50) to (Owner of (Casting unit)) Current gold
          • Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Casting unit))) + ( received + ((String((Int_Temp x 50))) + gold for ressurrecting his allies!)))
          • Unit - Kill (Casting unit)
        • Else - Actions
Yes, I know it's still leaky as a basket, but that's of later concern.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
First of all: Use 'A unit begins casting an ability'. That always seems to solve some problems (but probably not this one).

Second of all: Don't use an If/Then/Else Action. Move the condition to the regular Conditions, and move the Then - Actions to the regular actions.

Also it would be useful to know what all those variables are. What is Int_Temp, what is Int_Foundersingame, what is Boo_Founderdead[Array], etc.
I assume the unit you were talking about is of the unit-type Burial Site.
 
Level 9
Joined
Sep 8, 2004
Messages
633
Thanks for your attempt at helping, but I'm going to ignore the "first of all" and "second of all" because they are both irrelevant to the problem. I'm not new at GUI; this is just a part of a bigger trigger.

The variables point towards different things and have no real connection to the resurrecting itself. The only thing this trigger points out is that it's not the trigger... thing is that knowing what's not the problem doesn't help me.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
So what your trigger does is picking all units of Burial Site (I assume there is only 1), revive the hero with the 4 abilities at it's location, remove the Burial Site unit and kill the person who resurrected you.

Besides the fact that killing the person who resurrects you is weird to somebody who doesn't know what the intention of that is, I notice that this trigger will fail unless you make a new Burial Site unit. If that ain't the problem, then it got to be somewhere else, but I wouldn't know where.
 
Level 9
Joined
Sep 8, 2004
Messages
633
The burial site unit is made when the corresponding player's hero dies. The unit that resurrects is a priest, made specifically for the purpose of healing and ressurrecting, indeed giving it's own life.

Thing is, those are just not the problem.
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
First trigger:
  • Events - Unit dies
  • Conditions - Player - Owner of dying unit is playing
  • Actions
    • - Unit create 1 Burial Site for owner of dying unit
    • - Set burial_unit[Player Number(Owner of dying unit)] = last created unit
    • - Set dead_hero[Player Number(Owner of dying unit)] = dying unit
Second:
  • Events - Unit begins casting an ability
  • Conditions - Ability being cast equal to Ressurection
  • Actions - set ressurect_target = target of ability being cast
Third:
  • Events - [COLOR="Red"]Unit starts the effect of ability[/COLOR]
  • Condition - Ability being cast equal to Ressurection
  • Actions
    • - Unit kill/remove casting unit
    • - Hero revive instantly dead_hero[Player Number(Owner of ressurect_target)] at *position of burial_unit[Player Number(Owner of ressurect_target)]
    • - Unit kill/remove burial_unit[Player Number(Owner of ressurect_target)]
Should work now.
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
First,
If: 3rd and 4th spell are custom
Then: Base the 3rd and 4th spell of a different spell.
Else: Post the map here and let people check it out for themselfs.

Second, change your trigger to what Kingz said before saying something, it might just be the fact that your trigger is bugged that it doesn't work.

Third, it all seems just fine by me, perhaps your wc3 is just bugged? But we can check that out when u post the map.

Fourth, do you use any we enhancers like WEU of vJass stuf?
 
Level 9
Joined
Sep 8, 2004
Messages
633
The spells are based of exactly the existing spells like I said, Divine Shield and Wind Walk.

I'm not going to change my trigger to what Kingz said, I've tested several settings myself and like I said before, I'm not new to triggering.

My wc3 works fine in all other ways, so I presume it really has to do with the map itself.

I use the newest NewGen pack, though there's only one JASS system in this particular map; the rest is GUI.

I'll consider a few options, I might choose to post the map. I just wanted to try and see if anyone had this problem before and if there'd be an easy resolve. I think I'm going to use a workaround instead though.
 
Level 9
Joined
Sep 8, 2004
Messages
633
After another hour or two of trying different techniques to circumvent the problem I found it. Somewhere hidden within another trigger, the hero that was to be resurrected later on got "Paused" upon dying. Resurrecting a unit after it has been killed and paused apparently makes it able to move and act again, but disabling self-cast abilities! If anyone else ever finds him or herself in this situation, now we know.


Edit:
How is a thread changed to Solved?
 
Status
Not open for further replies.
Top