I am trying to have this ai attack players according to the command sent by trigger.
is it possible to change the player target in
call SuicideOnPlayerEx(M1,M1,M1,victim)
in the manner below? using if else
well apparently the function SuicideOnPlayerEx cannot take integer arguments.... so how do I correct this?
is it possible to change the player target in
call SuicideOnPlayerEx(M1,M1,M1,victim)
in the manner below? using if else
JASS:
function get_commands takes nothing returns nothing
//local integer cmd
local integer data
loop
loop
exitwhen CommandsWaiting() != 0
call Sleep(1)
endloop
//set cmd = GetLastCommand()
set data = GetLastData()
call PopLastCommand()
if data == 1 then
set victim = target
elseif data == 2 then
set victim = target2
elseif data == 3 then
set victim = target3
endif
endloop
endfunction
well apparently the function SuicideOnPlayerEx cannot take integer arguments.... so how do I correct this?