Finding a trigger (check for existence)
Posted: Mon Jun 15, 2020 9:47 am
I am building a simple unit AI function in Lua...
Basically I am writing a function to have it randomly do a few things. I want to call the function against a unit and have the function randomly schedule the next trigger/event to call the function again, until such a time as I turn the behaviour off.
I understand math.random and creating triggers and events.
What I do not understand is how to use the limited Trigger functions (like ScenEdit_SetTrigger, or ScenEdit_SetEventTrigger) to
check for the existence of a trigger. It is possible that I need to use ScenEdit_GetEvent for this.
Any thoughts? (recommendations?)
Basically I am writing a function to have it randomly do a few things. I want to call the function against a unit and have the function randomly schedule the next trigger/event to call the function again, until such a time as I turn the behaviour off.
I understand math.random and creating triggers and events.
What I do not understand is how to use the limited Trigger functions (like ScenEdit_SetTrigger, or ScenEdit_SetEventTrigger) to
check for the existence of a trigger. It is possible that I need to use ScenEdit_GetEvent for this.
Any thoughts? (recommendations?)