Regular_trigger doesn't work
Posted: Wed Dec 18, 2024 2:09 pm
ScenEdit_SetTrigger({mode='add',type='RegularTime',name='2 Seconds Trigger',interval=2})
local ScriptText = "print('Hello, CMO!')"
ScenEdit_SetAction({mode='add', type='LuaScript', name='Save Action',ScriptText=ScriptText})
ScenEdit_SetEvent('Save Event', {mode='add', isActive=true, isRepeatable=true})
ScenEdit_SetEventTrigger('Save Event',{mode = 'add', description = '2 Seconds Trigger'})
ScenEdit_SetEventAction('Save Event',{mode = 'add', description = 'Save Action'})
I want to print "Hello, CMO!" every 2 seconds,but It doesn't work and prints nothing.I will sincerely appreciate it if you could help me!!
local ScriptText = "print('Hello, CMO!')"
ScenEdit_SetAction({mode='add', type='LuaScript', name='Save Action',ScriptText=ScriptText})
ScenEdit_SetEvent('Save Event', {mode='add', isActive=true, isRepeatable=true})
ScenEdit_SetEventTrigger('Save Event',{mode = 'add', description = '2 Seconds Trigger'})
ScenEdit_SetEventAction('Save Event',{mode = 'add', description = 'Save Action'})
I want to print "Hello, CMO!" every 2 seconds,but It doesn't work and prints nothing.I will sincerely appreciate it if you could help me!!