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

[General] Blind Lame Priest

Status
Not open for further replies.
Level 3
Joined
Mar 26, 2019
Messages
54
Anyone who has played AOE 1 campaign might know a unit named blind lame priest. He will cast heal on any unit which inside his cast range, no matter whose that unit belong to. I want to make that kind of unit on my map, but I don't know how to make it cast heal with a fixed amount on any single unit on range. I don't want to base its ability on fountain heal, because it is aoe, and heal based on percentage.
 
I think this could work?

  • Random Spell
    • Events
      • Unit - A unit comes within 500.00 of YourUnit
    • Conditions
    • Actions
      • Unit - Order YourUnit to Heal (Triggering unit)
Just make a spell that can target everyone and trigger the healing in a separate spell trigger:

  • Healing Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourSpell
    • Actions
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + 500.00)

If your unit is placed on the map by triggers you need to add this action when creating the unit:

  • Trigger - Add to Random Spell <gen> the event (Unit - A unit comes within 500.00 of (Last created unit))
Or if it's trained from a building:

  • Add Event to trigger
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to YourUnitType
    • Actions
      • Trigger - Add to Random Spell <gen> the event (Unit - A unit comes within 500.00 of (Trained unit))


I haven't tested any of this but with a bit of tweaking it should be possible to make it work.
 
Last edited:
Level 3
Joined
Mar 26, 2019
Messages
54
Well, I thing I has found a solution, thank to your idea.
First, make a reserved player who is enemy of all other player, "blind lame priest" will belong to this player. Then, use "A unit is attacked" event; simply heal unit that be attacked. Since this event fire when a unit attemp to attack, there is no risk that the targeted unit get killed due to the attack. Just detect whether the target is full HP, order it to switch target, or stop if there is no target around.
 
Level 3
Joined
Mar 26, 2019
Messages
54
I think this could work?

  • Random Spell
    • Events
      • Unit - A unit comes within 500.00 of YourUnit
    • Conditions
    • Actions
      • Unit - Order YourUnit to Heal (Triggering unit)
Just make a spell that can target everyone and trigger the healing in a separate spell trigger:

  • Healing Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourSpell
    • Actions
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + 500.00)

If your unit is placed on the map by triggers you need to add this action when creating the unit:

  • Trigger - Add to Random Spell <gen> the event (Unit - A unit comes within 500.00 of (Last created unit))
Or if it's trained from a building:

  • Add Event to trigger
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to YourUnitType
    • Actions
      • Trigger - Add to Random Spell <gen> the event (Unit - A unit comes within 500.00 of (Trained unit))


I haven't tested any of this but with a bit of tweaking it should be possible to make it work.
Adding a new event each time a unit is created make an event leak.
Also, thank to the example.
 
With a bit of testing this is what I got:

  • Cast Heal
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 600.00 of (Position of (Random unit from (Units of type Priest)))) and do (Actions)
        • Loop - Actions
          • Unit - Order (Random unit from (Units within 600.00 of (Position of (Picked unit)) matching ((Unit-type of (Matching unit)) Equal to Priest))) to Human Paladin - Holy Light (Picked unit)
Attaching a map. Now you just need to base the spell on something that can target everyone and trigger the healed amount.
 

Attachments

  • TestHeal.w3x
    17.6 KB · Views: 119
Level 3
Joined
Mar 26, 2019
Messages
54
With a bit of testing this is what I got:

  • Cast Heal
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 600.00 of (Position of (Random unit from (Units of type Priest)))) and do (Actions)
        • Loop - Actions
          • Unit - Order (Random unit from (Units within 600.00 of (Position of (Picked unit)) matching ((Unit-type of (Matching unit)) Equal to Priest))) to Human Paladin - Holy Light (Picked unit)
Attaching a map. Now you just need to base the spell on something that can target everyone and trigger the healed amount.
Well, thank you. It is pretty better compare to my idea.
 
Hou can you make a player allied with neutral hositile.
An ability can cast on everyone does not mean it will be cast randomly on any unit on range, if given to a non-player.

There are triggers to make alliances, not sure if works for neutral hostile. But the priest really needs to be neutral hostile?

Here, should work fine:

  • Neutral Hostile
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Player - Make Player 1 (Red) treat Neutral Hostile as an Ally
      • Player - Make Neutral Hostile treat Player 1 (Red) as an Ally
 
Level 3
Joined
Mar 26, 2019
Messages
54
Here, should work fine:

  • Neutral Hostile
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Player - Make Player 1 (Red) treat Neutral Hostile as an Ally
      • Player - Make Neutral Hostile treat Player 1 (Red) as an Ally
Oh well! I don't even think that is possible! Come to think of this, why does us think about trigger order while this is possible?
 
Status
Not open for further replies.
Top