It is.
There's a series of functions called TriggerAddEvent*, that add events to triggers. Depending on the event you want to add, you use a different TriggerAddEvent function. Check out the natives.galaxy file.
Where is the natives.galaxy file:P?
Edit: found it here on this site
Thanks!
Edit2: ok now I have another problem I'm trying to use the triggeraddevent function I used to create a Gui action for it.
As my knowledge of scripting is close to 0 I want to ask if I inputted everything correctly as it doesn't work.
lp_t is a trigger parameter
lp_u is a unit parameter
lp_a is an ability command parameter
lp_stage is an ability stage parameter
lp_includeSharedAbils is an include/ignore option parameter
I've inputed the script above in the custom script section of the action I created.
This is to create a "unit uses ability" event
Ok I copied that but it still isn't working.
lp_stage needs to be an integer, but in the normal event it's a preset and I also use that but it doesn't work and gives an error that I don't use the correct parameter type. I understand why, but I have no idea what integer is the corrosponding number with the type I need.
I looked through the presets in the .galaxy file, but I couldn't find the one I have to use (wich is generic6 - complete)
Hey,
I want to add an event to a trigger using a trigger action. I asked this question in the trigger board, but got redirected to here.
So anyone knows if it's possible through galaxy script?
Thanks!
It is. There's a series of functions called TriggerAddEvent*, that add events to triggers. Depending on the event you want to add, you use a different TriggerAddEvent function. Check out the natives.galaxy file.
Where is the natives.galaxy file:P?
Edit: found it here on this site
Thanks!
Edit2: ok now I have another problem I'm trying to use the triggeraddevent function I used to create a Gui action for it.
As my knowledge of scripting is close to 0 I want to ask if I inputted everything correctly as it doesn't work.
lp_t is a trigger parameter
lp_u is a unit parameter
lp_a is an ability command parameter
lp_stage is an ability stage parameter
lp_includeSharedAbils is an include/ignore option parameter
I've inputed the script above in the custom script section of the action I created.
This is to create a "unit uses ability" event
Is it correct cus it doesn't work.
Looks pretty good except:
1) When you're calling a function then you don't write the type of each parameter.
2) You have to finish it with a semi-colon.
Ok I copied that but it still isn't working.
lp_stage needs to be an integer, but in the normal event it's a preset and I also use that but it doesn't work and gives an error that I don't use the correct parameter type. I understand why, but I have no idea what integer is the corrosponding number with the type I need.
I looked through the presets in the .galaxy file, but I couldn't find the one I have to use (wich is generic6 - complete)
It should work if you enter c_unitAbilStageComplete or -6 as the parameter value. If it doesn't then something else is wrong.
Ok I found the problem I couldn't use a unit parameter on the unitref parameter. So what should I use instead?
TriggerAddEventUnitAbility(lp_t, UnitRefFromUnit(lp_u), lp_a, lp_stage, lp_includeSharedAbils);