Page 1 of 1

Regular_trigger doesn't work

Posted: Wed Dec 18, 2024 2:09 pm
by wbllll
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!!

Re: Regular_trigger doesn't work

Posted: Wed Dec 18, 2024 6:53 pm
by blu3s
That setting is for 15seconds, there's not 2seconds trigger, is 1second or 5 seconds

The interval value is not the seconds is the preset to use.
1second = 0
5seconds = 1
15seconds = 2
...

Re: Regular_trigger doesn't work

Posted: Fri Dec 20, 2024 3:39 am
by wbllll
Got it!Thanks a lot and wish you a good day!!