Invalid argument type (rect), what should I do?
This line:
call TriggerAddCondition( gg_trg_Rescue_Quest_Start, Condition( function Trig_Rescue Quest_Start_Conditions ) )
keeps getting a compile error message I dont understand; "Invalid argument type (rect)". What does it mean, and what is wrong with the trigger?
Trigger:
This trigger is for an experiment map, but any other comments or tips are very welcome.
Thanks.
This line:
call TriggerAddCondition( gg_trg_Rescue_Quest_Start, Condition( function Trig_Rescue Quest_Start_Conditions ) )
keeps getting a compile error message I dont understand; "Invalid argument type (rect)". What does it mean, and what is wrong with the trigger?
Trigger:
Code:
function Trig_Rescue_Quest_Start_Conditions takes nothing returns boolean
if udg_Quest_Completed[0] == true then
return false
endif
if udg_Rescue_Quest_Active[GetPlayerId(GetOwningPlayer(GetEnteringUnit()))] == true then
return false
endif
if ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) then
return false
endif
return true
endfunction
function Trig_Rescue_Quest_Start_SimpleTransmission takes player whichPlayer, unit whichUnit, string unitName, sound soundHandle, string message, integer timeType, real timeVal, boolean wait returns nothing
call TryInitCinematicBehaviorBJ()
set bj_lastTransmissionDuration = GetTransmissionDuration(soundHandle, timeType, timeVal)
set bj_lastPlayedSound = soundHandle
if GetLocalPlayer() == whichPlayer then
call DoTransmissionBasicsXYBJ(GetUnitTypeId(whichUnit), GetPlayerColor(GetOwningPlayer(whichUnit)), GetUnitX(whichUnit), GetUnitY(whichUnit), soundHandle, unitName, message, bj_lastTransmissionDuration)
endif
if wait and (bj_lastTransmissionDuration > 0) then
call WaitTransmissionDuration(soundHandle, timeType, timeVal)
endif
endfunction
function Trig_Rescue_Quest_Start_Actions takes nothing returns nothing
set udg_Rescue_Quest_Active[GetPlayerId(GetOwningPlayer(GetEnteringUnit()))] = true
call Trig_Rescue_Quest_Start_SimpleTransmission(GetOwningPlayer(GetEnteringUnit()), gg_unit_nvil_0028, "Villager", null, "Insert sterotype rescue-my-brother-please-message here", bj_TIMETYPE_SET, 8, true)
endfunction
function InitTrig_Rescue_Quest_Start takes nothing returns nothing
set gg_trg_Rescue_Quest_Start = CreateTrigger()
call TriggerRegisterEnterRegion(gg_trg_Rescue_Quest_Start, gg_rct_Rescue_Quest_Home, null)
call TriggerAddCondition( gg_trg_Rescue_Quest_Start, Condition( function Trig_Rescue Quest_Start_Conditions ) )
call TriggerAddAction(gg_trg_Rescue_Quest_Start, function Trig_Rescue_Quest_Start_Actions)
endfunction
This trigger is for an experiment map, but any other comments or tips are very welcome.
Thanks.