• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Request/Help: WoW style Revival trigger(s)

Status
Not open for further replies.
Level 3
Joined
Nov 11, 2007
Messages
39
Im looking to create a trigger(s) that enable a WoW style of revival.

A hero dies

A marker (body/grave) is placed at location of dying unt
A ghost is created at nearest Graveyard

A ghost comes within a certain distance of grave, give ghost dummy ability revive

A ghost leaves a certain distance of grave, remove dummy ability revive

ghost casts revive, revive hero at location of ghost


The only problem im having im really having is adding/removing the ability from the ghost, the rest is fairly stright forward. The "comes within range" function requires a definate unit and will not function with a variable and has no "unit leaves range" counterpart. I tried using moving regions but that gets confusing and regions dont really like to be moved.

Any help would be greatly appreciated.
 
Level 3
Joined
Apr 7, 2007
Messages
48
Use the Trigger - Add Event Function to add a unit by variable to the function.
Edit: Upon looking over my post I realized I don't even know what I just said.
  • Trigger - Add to (your_trigger) the event (Unit - A unit comes within range of your_unit)
And umm what do you mean about trouble adding/removing? Like trouble with the function, or where to put the action in the trigger itself. Postings of your problem areas really help.
 
Level 3
Joined
Nov 11, 2007
Messages
39
ok so far i have...

  • Create Grave
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Player4
          • (Triggering unit) Equal to Player5
          • (Triggering unit) Equal to Player6
          • (Triggering unit) Equal to Player7
          • (Triggering unit) Equal to Player8
          • (Triggering unit) Equal to Player9
          • (Triggering unit) Equal to Player10
          • (Triggering unit) Equal to Player11
          • (Triggering unit) Equal to Player12
    • Actions
      • Unit - Create 1 Hero Grave for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
      • Set Player4Grave = (Last created unit)
  • Create Ghost
    • Events
      • Unit - A unit Becomes revivable
    • Conditions
      • (Triggering unit) Equal to Player4
      • (Triggering unit) Equal to Player5
      • (Triggering unit) Equal to Player6
      • (Triggering unit) Equal to Player7
      • (Triggering unit) Equal to Player8
      • (Triggering unit) Equal to Player9
      • (Triggering unit) Equal to Player10
      • (Triggering unit) Equal to Player11
      • (Triggering unit) Equal to Player12
    • Actions
      • Unit - Create 1 Ghost for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing Default building facing degrees
      • Set Player4Ghost = (Last created unit)
  • Cast Res
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Res
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 4 (Purple)
        • Then - Actions
          • Unit - Remove Player4Ghost from the game
          • Unit - Remove Player4Grave from the game
          • Hero - Instantly revive Player4 at (Position of (Triggering unit)), Show revival graphics
        • Else - Actions

Player 4-12 are Variables for the player heros. All im missing is 2 triggers, one to add the ability "res" to units that come within range and one to remove it from units leaving range.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Try this.

  • Unknown
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set GhostLocation[4] = (Position of Player4Ghost)


  • Unknown
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 256.00 of GhostLocation[4] matching ((Owner of (Picked unit)) Equal to Player 4 (Purple))) and do (Actions)
        • Loop - Actions
          • If ((Picked unit) Equal to Player4Grave) then do (Unit - Add Acid Bomb to Player4Grave) else do (Do nothing)
          • If ((Picked unit) Equal to No unit) then do (Unit - Remove Acid Bomb from Player4Grave) else do (Do nothing)

This is the trigger/hard way.
You could much easily and less buggy use a aura skill.
When unit has the aura buff - add him skill.

  • Unknown
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
    • Actions
      • If ((Player4Grave has buff Revive) Equal to True) then do (Unit - Add Revive_Skill to Player4Grave) else do (Unit - Remove Revive_Skill from Player4Grave)
(I wonder why I posted the first one ? 0.0)
 
Status
Not open for further replies.
Top