I'm making DnD map and i want that Gamemasters can place heals (Academy = Heal).
But i don't know how to make trigger(s) that gms can place them infinite and everytime unit goes near academy hp goes to 100%.
[(sry my eng if it is bad
)]
I assume you will be using something like a science vessel or observer to place stuff on the map, so you will want to have the following trigger.
Owner:
Gamemasters
Conditions:
Always
Actions:
Preserve Trigger
Center location labeled "Unit Placer" on Science vessel owned by Current Player.
Now, this will only make 1 location move around for all the gamemasters. If you have more than one, you might want to use two triggers and two locations instead.
Then,
Owner:
Gamemasters
Conditions:
Whatever you need to do to make academy
Actions
Preserve Trigger
Create 1 academy at "Unit Placer" for Current Player.
This will make the academy placeable. If you want to avoid problems with cannot place unit stuff, then create the unit at some other location first, then move it to Unit Placer.
Owner:
All Players or whoever owns the academies
Conditions:
Always
Actions:
Preserve Trigger
Center location labeled "Academy Heal" on Academy owned by Current Player.
For the heal
Owner:
All Players or whoever wants to be healed
Conditions:
Current Player brings 1 unit to "Academy Heal"
Actions
Preserve Trigger
Modify Unit HP: Set to 100% for any unit owned by Current Player.
These top two triggers will always move the location "Academy Heal" thus allowing you to heal at any academy on the map.
I found another way ^-^
Trigger |
Players: |
¤ Players that will be healed |
Conditions: |
¤ Always |
Actions: |
¤ Move location "hero" on "unit" at "anywhere" |
Trigger |
Players: |
¤ Players that will be healed |
Conditions: |
¤ "player that owns heal" brings "academy" at least 1 to "hero" |
Actions: |
¤ Modify Unit HP: Set to 100% for any unit owned by Current Player at "hero" |
Now everytime academy comes to heros location that follows hero, hero will be healed
rockz, that wouldn't work...the location would center on the bottom-leftmost academy indefinitely and when there are no academies, the location would go to the middle of the map(healing even though there aren't any academies).
If a player can have an undefined amount of units, then whenever an academy is placed, create a burrowed unit by it. Use the center location on a burrowed unit, set all health to 100, then give it to another player.
Repeat, then give it back to the original player that owned the burrowed units.