The code does not throw and error, other code after it executes, but this trigger is not being created...
I suspect that I did not code it correctly, the following code was my best guess after reading the documentation.
Code: Select all
local eName = 'some_unique_string_value'
ScenEdit_SetEvent(eName, {mode='add', isRepeatable = false, isActive= active})
--generate the trigger for the actual unit entering a small area defined around the destination.
ScenEdit_SetTrigger({mode='add', type='UnitEnterArea', name=eName,
targetFilter={SPECIFICUNIT=unit_name},
area={stepKeyValueName.."_RP_1", stepKeyValueName.."_RP_2",
stepKeyValueName.."_RP_3", stepKeyValueName.."_RP_4"},
exitarea=false})
ScenEdit_SetEventTrigger( eName, {Mode='add', eName});
--create the script for the end EndfMove event...
local script = ""
script = script.."myLibrary.FunctionName('"..strParam1.."', '"..strParam2.."',".."\r\n"
script = script.." '"..strParam.."')"
ScenEdit_SetAction({Mode='add', name=eName, ScriptText=script })
ScenEdit_SetEventAction( eName, {Mode='add', name=eName})