OK so i have a problem with the few triggers world editors gui is offering me. My current trigger is
Event: a unit enters region(5)
Condition: unit is equal to darkgreen
Condition: terrain is equal to Cityscape grass
Action: Give unit the ability (command aura)
I am looking for an event that doesn't make you choose a specific region because the trigger will work the same and wont have to be copy/paste hundreds of times and edit the regions since this map has approx: 300 regions.
What i would like is something such as
Event: a unit enters a region
If no gui trigger can be made as simple as requested, perhaps someone who knows jass can help create a trigger that would fit appropriate. Please help, and thanks to who ever has a solution!
Limitation for region triggers? help needed
Forum rules
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.
Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.
Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.
Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.
Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.
Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.
Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
Limitation for region triggers? help needed
This is a guest account intended for use by people who wish to remain anonymous or hate registering.
(Please don't forget to sign your posts with your name if you want us to know who you are.)
http://www.bugmenot.com/view/3ice.hu
(Please don't forget to sign your posts with your name if you want us to know who you are.)
http://www.bugmenot.com/view/3ice.hu
- 3ICE
- Admin
- Posts: 2630
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Limitation for region triggers? help needed
No such event is available.
When I work with regions, I put them in arrays for reusability:
When I work with regions, I put them in arrays for reusability:
Regions
Events Map Initialization Conditions Actions Set Region_array[0]=Untitled Region 001 Set Region_array[1]=Untitled Region 002 Set Region_array[2]=Untitled Region 003 ... Set Region_array[299]=Untitled Region 300
Then adding them all as an event is as simple as:
Events Map Initialization Conditions Actions Set Region_array[0]=Untitled Region 001 Set Region_array[1]=Untitled Region 002 Set Region_array[2]=Untitled Region 003 ... Set Region_array[299]=Untitled Region 300
Initialization
Events Map Initialization Conditions Actions For each integer A between 0 and 299 do Trigger - Add new event to Trigger 001: A unit enters Region_array[Integer A]
Events Map Initialization Conditions Actions For each integer A between 0 and 299 do Trigger - Add new event to Trigger 001: A unit enters Region_array[Integer A]
Re: Limitation for region triggers? help needed
OK so i attempted to add regions as variables using arrays but seems it doesn't save any triggers (still have to use around 300)
i'm not sure how this works with regions relating to changing the tiles. Like i need a quick way to add spells to a unit entering odd regions 1,3,5,7 for player 1 and player 2 even regions 2,4,6,8 as of now i would have to edit each trigger for all 300 regions example i'm working with:
1st region trigger of about 300
Event: a unit enters region 001
Condition: terrain type at (center of region 001) equal to cityscape grass
Condition: Owner of Triggering unit equal to player 11(Dark green)
Action: add command aura to (triggering unit)
*also the same trigger for leaving a region is made for each region
This is the only method i can think of to work with terrain changes in each region( as posted before, a player types -T1 and all "even or odd" regions will change)
please be specific again which helps a lot!
i'm not sure how this works with regions relating to changing the tiles. Like i need a quick way to add spells to a unit entering odd regions 1,3,5,7 for player 1 and player 2 even regions 2,4,6,8 as of now i would have to edit each trigger for all 300 regions example i'm working with:
1st region trigger of about 300
Event: a unit enters region 001
Condition: terrain type at (center of region 001) equal to cityscape grass
Condition: Owner of Triggering unit equal to player 11(Dark green)
Action: add command aura to (triggering unit)
*also the same trigger for leaving a region is made for each region
This is the only method i can think of to work with terrain changes in each region( as posted before, a player types -T1 and all "even or odd" regions will change)
please be specific again which helps a lot!
This is a guest account intended for use by people who wish to remain anonymous or hate registering.
(Please don't forget to sign your posts with your name if you want us to know who you are.)
http://www.bugmenot.com/view/3ice.hu
(Please don't forget to sign your posts with your name if you want us to know who you are.)
http://www.bugmenot.com/view/3ice.hu
- 3ICE
- Admin
- Posts: 2630
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Limitation for region triggers? help needed
Well you are not being specific at all.
Even (0 2 4 6 8...)
Events Map Initialization Conditions Actions For each integer A between 0 and 149 do Trigger - Add new events to Trigger 001: A unit enters Region_array[2*Integer A] A unit leaves Region_array[2*Integer A]
Events Map Initialization Conditions Actions For each integer A between 0 and 149 do Trigger - Add new events to Trigger 001: A unit enters Region_array[2*Integer A] A unit leaves Region_array[2*Integer A]
Odd (1 3 5 7 9...)
Events Map Initialization Conditions Actions For each integer A between 0 and 149 do Trigger - Add new events to Trigger 002: A unit enters Region_array[(2*Integer A)+1] A unit leaves Region_array[(2*Integer A)+1]
Events Map Initialization Conditions Actions For each integer A between 0 and 149 do Trigger - Add new events to Trigger 002: A unit enters Region_array[(2*Integer A)+1] A unit leaves Region_array[(2*Integer A)+1]
-
- Posts: 39
- Joined: Fri May 21, 2010 6:50 pm
- Account: Thurst4blood
Re: Limitation for region triggers? help needed
Would this work for making kill regions in mazes?
- 3ICE
- Admin
- Posts: 2630
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Limitation for region triggers? help needed
Yes, but why bother? Setting up the 1000 regions for my loop-through method above is exactly the same amount of work as setting up the 1000 events for the good old kill trigger. And the good old kill trigger is easier to maintain and uses less memory and CPU.
Unless you need to do something fancy with the regions (like above: every second region is picked, etc) there is no reason to put them in an array.
Unless you need to do something fancy with the regions (like above: every second region is picked, etc) there is no reason to put them in an array.
- 3ICE
- Admin
- Posts: 2630
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Limitation for region triggers? help needed
Here is an easier to maintain version of the region setup I posted above:
Set i=i+1 //Increment counter
Set Region_array=Untitled Region ___ //next
Just repeat these two lines and change every second line to the next region.
(Admins CAN double post - I make the rules!)
Regions
Events Map Initialization Conditions Actions Set i=0 Set Region_array=Untitled Region 001 Set i=i+1 Set Region_array=Untitled Region 002 Set i=i+1 Set Region_array=Untitled Region 003 Set i=i+1 ... Set i=i+1 Set Region_array=Untitled Region 300
It uses a counter, so if you accidentally leave out, say region 150, you don't have to go back and change every array index from 151 to 300 and decrease it by 1. The building block is:Events Map Initialization Conditions Actions Set i=0 Set Region_array=Untitled Region 001 Set i=i+1 Set Region_array=Untitled Region 002 Set i=i+1 Set Region_array=Untitled Region 003 Set i=i+1 ... Set i=i+1 Set Region_array=Untitled Region 300
Set i=i+1 //Increment counter
Set Region_array=Untitled Region ___ //next
Just repeat these two lines and change every second line to the next region.
(Admins CAN double post - I make the rules!)
Who is online
Users browsing this forum: No registered users and 397 guests