Hi,
i have a trigger which is activated by a large number of "unit enters region" event type.
I'd like to improve the readability of this trigger (the regions are around 200...).
Unluckily i noticed that its not possible to use arrays of regions in this event.
I thought of making a custom event looking like "unit enters region[any index] but i really have no idea how to make it.
Is there any tutorial about custom events?
Or anybody has a better idea than mine?
The trigger im talking about controls the pathing of creeps in my 8 players tower defence, all the actions are the same for every player, but it must be activated by all the regions of the path of all the players.
(another way would be to just copy the trigger 8 times and change all the events each time, but since the trigger is exactly the same i'd rather try improve the event part)
Basically you're hosed in a way. The reason you can't use region arrays is probably that they're not initialized at the time the events get registered. So the event doesn't ackowledge them.
The trick to circumvent this is to add your events at a later stage.
But GUI doesn't really allow this, and Blizzard's oh-so-awesome custom Events don't work.
But it's a child's play with some galaxy scripting wohoo :P
So I attached the map. Simply copy over the one custom action definition into your map and you're set. (look at the other two triggers to see how it works).
Blizzard half-heartedly added an option for us to write our own event definitions. Basically to define own events. But they don't work, they just give syntax errors.
So all events you see in your lists do work just fine. We just cannot make our own. Well, in this case that way is best anyway.. making it a custom event wouldn't really get rid of the initial problem now that I think of it.
Hi, i have a trigger which is activated by a large number of "unit enters region" event type.
I'd like to improve the readability of this trigger (the regions are around 200...).
Unluckily i noticed that its not possible to use arrays of regions in this event.
I thought of making a custom event looking like "unit enters region[any index] but i really have no idea how to make it.
Is there any tutorial about custom events? Or anybody has a better idea than mine?
The trigger im talking about controls the pathing of creeps in my 8 players tower defence, all the actions are the same for every player, but it must be activated by all the regions of the path of all the players. (another way would be to just copy the trigger 8 times and change all the events each time, but since the trigger is exactly the same i'd rather try improve the event part)
Thanks,
Nite
Basically you're hosed in a way. The reason you can't use region arrays is probably that they're not initialized at the time the events get registered. So the event doesn't ackowledge them.
The trick to circumvent this is to add your events at a later stage.
But GUI doesn't really allow this, and Blizzard's oh-so-awesome custom Events don't work.
But it's a child's play with some galaxy scripting wohoo :P
So I attached the map. Simply copy over the one custom action definition into your map and you're set. (look at the other two triggers to see how it works).
@s3rius:
sweet, ive also been wondering if this was possible, thanks s3rius
does this method work for all events? like Unit enters range of unit, and unit enters point?
@LinkD: Go
I only set it up to work for Unit Enters Region. But the same method can be used for all events.
@LinkD: Go
wonderful! i just tested it and it works great!
it's also possible to track "triggering unit" and "triggering region" on the "region entered" trigger.
Thanks a lot!
By the way, why custom events dont work?
@Nite01: Go
Blizzard half-heartedly added an option for us to write our own event definitions. Basically to define own events. But they don't work, they just give syntax errors.
So all events you see in your lists do work just fine. We just cannot make our own. Well, in this case that way is best anyway.. making it a custom event wouldn't really get rid of the initial problem now that I think of it.
@s3rius: Go
all right, thanks again!