• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Need Some Help With Regions

Status
Not open for further replies.
Level 9
Joined
Oct 17, 2007
Messages
547
I'm trying to write a trigger that display a text everytime a unit enters or leaves an area. The areas don't fit in the regions perfectly so i have to make several regions per area. I know that in WEU theres an advance trigger that allow u to combine all those different regions into 1 big one so it makes it easier to write the GUI code. I heard using WEU advance triggers might cause leaks or errors so Im asking if anyone here knows how to do it using just GUI from WE.
 
Level 8
Joined
Mar 23, 2007
Messages
302
i dont get what u need, want ?

are u afraid of doing hunderts of regions, naming them and doing the rest with the triggers? (this is normal work)

however, what is our map about, what is the goal u want.
how do those regions have to look?
so more informations PLHEASESESE...

for a solituon i would try this, (for as much as i could understand):

make like 30 regions to get the field catched u need.
then color them with a color other lands dont have, additional u give them Big beginning letters in alphabetic order like this:

A_what
A_ever
A_land
A_...

B_other
B_land
B_of
B_...

C_... and so on.
now u got them beautifully orderd.

after this u could give every unit a hiden Spell book
in this spellbook u give a special ability, with X lvls where x is the number of
All lands u have in your map.
so the trigger would be like this:
Unit enters region A_what, A_ever, A_land or A_...
it units has lvl of hiden abilit equal 1 then dont show text
If the unit doesnt have fulfiled the condition then Show text and change lvls ability to 1.

another solution instead of dooing this is to get the borders of all
land , whenever crossing thos borders do same as above.

...
yea, hey where is the problem here.....
 
Level 9
Joined
Oct 17, 2007
Messages
547
Ok i guess i didnt explain it well enough a bit confusing. Alright I'll try to make it clear.
For example, I have 2 areas and i want to make a basic GUI trigger:
-Everytime a unit leaves area A it will display "You have left A" and whenever a unit enters area B it will display "You have enter B." which is a very simple thing to do.
The problem is that each area of my map doesn't fit in a perfect square or rectangle (the region box) so i need to combine a bunch of them to cover the area i want.
WEU has the function of combining all those seprate rects into 1 region which covers all the area i need then write the code for that region only.
I heard WEU advance triggers might have compile errors and/or lag the map thats why im asking if theres any other way of doing it.
Hope its more clear now for everyone to read.
 
Level 2
Joined
Mar 15, 2008
Messages
14
LordHunter had an excellent idea for a quick and easy solution. But Equal is also very right. If you can't get one square to fit then you have to take the long way 'round and do more work.
I suggest using Integer variables to take care of the extra regions, and also to handle entering and exiting new regions. Set the default of an Integer to 0, then change it to 1 when he leaves the region. Something like this:

Unit leaves region
region equal to region A
set region_counter = 1
trigger - run trigger region A text

--(trigger region A text)--
event
condition
action
if
region_counter = 1
then
game display text "+++++"
else
do nothing


and make similar triggers to take care of the other regions. Just don't forget to set integers back and forth when coming to and fro. Hope this helps a little... or was I way in left field?
 
Status
Not open for further replies.
Top