1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| //============================================================================== //指向導彈 function CreateMissilesLoc takes player p, unit attacker, integer UnitType, real speed, real radius, location start, location end , real earc , real damage, attacktype type1 , damagetype type2 , string targetLocEffect returns unit
local real angle = AngleBetweenPoints(start, end) local unit vest = CreateUnitAtLoc(p, UnitType, start , angle ) local integer handleId = GetHandleId(vest)
call PauseUnit(vest, true) call SetUnitPathing( vest, false ) call UnitAddAbilityBJ( 'Arav', vest) call UnitRemoveAbilityBJ( 'Arav', vest)
//---------------------------------------------------------- call SaveUnitHandle(Missiles_loc_table, handleId, 0, vest) call SaveReal(Missiles_loc_table, handleId, 1, damage) call SaveLocationHandle(Missiles_loc_table, handleId, 2, end) call SaveUnitHandle(Missiles_loc_table, handleId, 3, attacker) call SaveReal(Missiles_loc_table, handleId, 4, earc) call SaveReal(Missiles_loc_table, handleId, 5, radius) call SaveReal(Missiles_loc_table, handleId, 6, speed) call SaveStr(Missiles_loc_table, handleId, 7, targetLocEffect) call SaveLocationHandle(Missiles_loc_table, handleId, 8, start)
call GroupAddUnit(Missiles_Unit_Group, vest) return vest endfunction
|