- Jan 30, 2013
Nice, about time we got more of the useful events.
| The thrown Event:|
+1 = entered range;
-1 = Autoderegister on killed/removed/replaced
|WithinRangeUnit||The registered unit to which an unit is nearing|
|WithinRangeEnteringUnit||The unit entering the range|
|WithinRangeRange||The registered range of the current Event|
|WithinRangeUsers||A Group containing all units using Range detection generated by this system.|
|WithinRangeWanted_Filter|| Used when evoking UnitWithinRange, a Filter can only access the entering Unit with Triggering Unit|
A Filter allows you to prevent unwanted Event Throws.
resetValue = no Filter
|WithinRangeWanted_Trigger|| This Trigger will be executed, when an unit enters (it checks conditions)|
resetValue = no Trigger
|WithinRangeWanted_Event|| defines the event thrown, when an uniter enters.|
(0 won't throw an event)
resetValue = "constant function UnitWithinRangeDefaultEvent", default 1.0
|WithinRangeWanted_Keep|| when set the Wanted_ variables won't reset when evoking UnitWithinRange|
function RegisterUnitWithinRangeEvent takes unit u, real range, code filter, real eventValue returns boolean - more simple usage of super: no trigger, destroyFilterWhenDone=true, cleanOnKilled = true function RegisterUnitWithinRangeTrigger takes unit u, real range, code filter, trigger execution returns boolean - more simple usage of super: no Event Thrown, destroyFilterWhenDone=true, cleanOnKilled = true function RegisterUnitWithinRangeSuper takes unit u, real range, boolean cleanOnKilled, boolexpr filter, trigger execution, real eventValue, boolean destroyFilterWhenDone returns boolean - inside the filter you can only access the entering Unit with GetTriggerUnit() - Start the detection for this Unit with this range - can not register twice the same range (main number 800.0 and 800.1 are now allowed) onto 1 unit. - cleanOnKilled will generate an trigger which will execute DeRegisterUnitWithinRangeUnit as soon the unit dies. - cleanOnKilled creates 1 Trigger for each Unit registered. function RegisterUnitWithinRangeEx takes unit u, real range, boolean cleanOnKilled, boolexpr filter returns boolean -backwards comptatible, wrapper for super function RegisterUnitWithinRange takes unit u, real range, boolean cleanOnKilled returns boolean -backwards comptatible, wrapper for super function DeRegisterUnitWithinRange takes unit u, real range returns boolean Destroys the range detection with this specific Range and Unit. function DeRegisterUnitWithinRangeUnit takes unit u returns boolean Destroys all Triggers used by the unit from UnitWithinRange.
Dr Super Good
| One can now choose the EventValue thrown, or to not throw an event.|
One can now choose a trigger beeing executed (includs checking conditions) when a unit enters
GUI can now use the Filters.
Destroys the given Filters, as soon the triggers is deregistered, except you evoked "function RegisterUnitWithinRangeSuper" directly and choosed otherwise.
| Hashes triggers <-> unit now with registered Range|
-> better remove/registering
-> one can not register 2 ranges with the same main number (onto the same unit) anymore (800.2 & 800.1)
Now one can setup an BoolExpr Filter, to prevent unwanted events (not supported in GUI)
moved the GUI Wrappers into the main Code.
|auto clean now at <= 0.405|
Removes now the last TriggerHandle when reindexing.
Removes now TriggerHandle from the table when removeing single Ranges.
replaced an unneeded table read with an local variable
| removed outcommented code|
Added gui wrapper Triggers for "Deregister x" and "Deregister all"
This Triggers are in the optional wrapper folder