I made an action for a certain type of unit in my tower defense. When I call it, I call it four times, once for each aisle. The problem is that the trigger runs the action and waits for it to complete. The function has multiple wait statements inside to monitor the unit's position. The end result is that each aisle gets their enemy one at a time. Run Trigger has the option to not wait, would I be able to do this with my function? I'd just make them triggers but it needs to be a function because I pass multiple parameters into it. I suppose I could make 4 triggers, one for each aisle, but I may be doing this again for other waves. It seems like there should be a quicker way of doing this. Thanks
You could try converting it to a function that always returns (boolean) true, placing the return statement before the waits - then you would call it by using "SetVariable dummyBoolean = MyFunction" I have no idea if that will work, but it's probably worth a try.
Found the problem. I was so used to setting up Action Queues to order these units from one point to another, and my function used it as well. So it wasn't waiting for the action function, it was waiting for the action queue to finish. And the queue is unnecessary for this wave since the function monitors the unit the whole time, so I removed it. It works now. Sorry about that, thanks for the help!
I made an action for a certain type of unit in my tower defense. When I call it, I call it four times, once for each aisle. The problem is that the trigger runs the action and waits for it to complete. The function has multiple wait statements inside to monitor the unit's position. The end result is that each aisle gets their enemy one at a time. Run Trigger has the option to not wait, would I be able to do this with my function? I'd just make them triggers but it needs to be a function because I pass multiple parameters into it. I suppose I could make 4 triggers, one for each aisle, but I may be doing this again for other waves. It seems like there should be a quicker way of doing this. Thanks
You could try converting it to a function that always returns (boolean) true, placing the return statement before the waits - then you would call it by using "SetVariable dummyBoolean = MyFunction" I have no idea if that will work, but it's probably worth a try.
EDIT: Listen to Helral instead.
@t1du: Go
at the action definition check the Create thread check-box.
It's visible if you select the action type.
Thanks for the replies. I already have Create Thread selected.
@t1du: Go
and it is an action definition not a function? ( Options: Action, Create Thread )
@Helral: Go
just tested it with text messages, and it does work correctly for me.
Found the problem. I was so used to setting up Action Queues to order these units from one point to another, and my function used it as well. So it wasn't waiting for the action function, it was waiting for the action queue to finish. And the queue is unnecessary for this wave since the function monitors the unit the whole time, so I removed it. It works now. Sorry about that, thanks for the help!