I got two problems with my personal modified trigger"Units in area work on unit2"
I have added the function to modify the radius but there are still some small problems.
First problem is when the center unit is dead, the units in death center unit area are still be able to work on the unit,I don't know how to make units in area don't execute when the center unit is dead.
The second problem is I don't know how to set inclube center unit or not.I saw your trigger has this function but I don'know how to set, I need your help.
Here is my trigger:
<Effect name="Units in area work on unit2">
<Param name="PlayerID" dispName="$$22444$$From Player" VarType="player">1</Param>
<Param name="UnitType" dispName="Source Unit Type" VarType="unittype">Unit</Param>
<Param name="SrcObject" dispName="$$22300$$Center Unit" VarType="unit">default</Param>
<Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
<Param name="DstObject" dispName="Target Unit" VarType="unit">default</Param>
<Command>for (all=1800;>-1){ if (kbGetUnitTypeName(all)=="%UnitType%") break;}</Command>
<Command>for(Qid=0;>1){}</Command>
<Command>xsSetContextPlayer(%PlayerID%);kbLookAtAllUnitsOnMap();</Command>
<Command>Qid=kbUnitQueryCreate("QDUA_%PlayerID%_%UnitType%");</Command>
<Command>kbUnitQuerySetPlayerID(Qid, %PlayerID%, true);</Command>
<Command>kbUnitQuerySetUnitType(Qid, all);</Command>
<Command>kbUnitQuerySetPosition(Qid, kbGetBlockPosition("%SrcObject%"));</Command>
<Command>kbUnitQuerySetMaximumDistance(Qid, %Dist%);</Command>
<Command>kbUnitQuerySetAscendingSort(Qid, false);</Command>
<Command>kbUnitQuerySetState(Qid,2);</Command>
<Command>for(i=kbUnitQueryExecute(Qid)-1;>-1){ </Command>
<Command>trUnitSelectClear();</Command>
<Command>trUnitSelectByID(1*kbUnitQueryGetResult(Qid,i));</Command>
<Command>trUnitDoWorkOnUnit("%DstObject%");</Command>
<Command>}</Command>
</Effect>
[This message has been edited by ChinaBurgerMaker (edited 11-02-2016 @ 10:41 PM).]