JASS:
function RoadFlareConditions takes nothing returns boolean
return GetSpellAbilityId()==039;A022039;
endfunction
function RoadFlare takes nothing returns nothing
local unit marine = GetTriggerUnit()
local player p = GetOwningPlayer(marine)
local unit u
local unit missile
local location l = GetSpellTargetLoc()
local real x = GetLocationX(l)
local real y = GetLocationY(l)
local integer i = 1
call PolledWait(0.1)s
call FloatingText(marine,5.0, udg_Pcolor[GetConvertedPlayerId(p)] + GetPlayerName(p) + "|r : Watch out, Im sending in flare!" )
set missile = CreateUnit(Player(11),039;h00H039;,GetUnitX(marine),GetUnitY(marine),0.0)
call UnitApplyTimedLife(missile,039;Bhwd039;,15.0)
call IssuePointOrderLoc(missile,"attackground",l)
call PolledWait(2.5)
call TriggerSleepAction(0.)
set u = CreateUnit(Player(p),039;h001039;,x,y,0.0)
call UnitApplyTimedLife(u,039;Bhwd039;,60.0)
call RemoveLocation(l)
call RemoveUnit(missile)
set marine = null
set missile = null
set l = null
set u = null
endfunction
//===========================================================================
function InitTrig_Road_Flare takes nothing returns nothing
set gg_trg_Road_Flare = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Road_Flare,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition( gg_trg_Road_Flare, Condition( function RoadFlareConditions ) )
call TriggerAddAction(gg_trg_Road_Flare,function RoadFlare)
endfunction
When i try to save the map i get a syntax error for this line
JASS:
set u = CreateUnit(Player(p),039;h001039;,x,y,0.0)
all i want it to do is (h001) is the flare unit with locust and i want it to create that unit for player who casted the ability,