- Joined
- Jul 5, 2014
- Messages
- 556
I think it falls under spells (or abilities more precisely): is it possible to make the healing fountain's passive ability into a non-combat healing?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Triggering the fountain healing would be easy, next you could add units to a unit group when they've made an attack or been attacked and remove them once a period of time has elapsed.
Knowledge of basic trigger enhancing would be required.
Attacked

Events


Unit - A unit Is attacked

Conditions

Actions


Set VariableSet CV = (Custom value of (Triggering unit))


Set VariableSet AttackCounter[CV] = (AttackCounter[CV] + 1)


Wait 1.00 seconds


Set VariableSet CV = (Custom value of (Triggering unit))


Set VariableSet AttackCounter[CV] = (AttackCounter[CV] - 1)
Healing Loop

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


Set VariableSet TempPoint = (Position of Healing Fountain)


Custom script: set bj_wantDestroyGroup = true


Unit Group - Pick every unit in (Units within 300.00 of TempPoint.) and do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






AttackCounter[(Custom value of (Picked unit))] Equal to 0






((Picked unit) is A structure) Equal to False






((Picked unit) is alive) Equal to True





Then - Actions






Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) + 1.00)%





Else - Actions


Custom script: call RemoveLocation (udg_TempPoint)
Here's an example map (requires latest version).
Also, the Variables used:
CV = Integer
AttackCounter = Integer [ARRAY]
TempPoint = Point
Do you know all of that things that @Uncle show and check the owner and non-mechanical units are in the 1.26?I appreciate it but I only have 1.26. Also, there are factors like owner and non-mechanical units, so I may better off modifying a scroll of regeneration into an ability and make it manual.
Like Herly said, the trigger will allow you to filter any types of units you want, triggers tend to give you far greater control than an ability.I appreciate it but I only have 1.26. Also, there are factors like owner and non-mechanical units, so I may better off modifying a scroll of regeneration into an ability and make it manual.