HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Roads

09-27-2004, 11:53 PM#1
CCrew
I need help on a certain trigger pertaining to roads. Maybe you have played Heroes and Empires, or Genesis of Empires and already understand roads, but the basic concept is all roads lead to a town hall, and all residences are connected to roads. So what i need is a trigger that says:
Initiation
Road Begins Construction

Condition
It is near another road = false or near a town hall=False

Action
Cancel Construction

The only problem im having is with the condition. Please help me with this trigger. If i have this, i can find the same for a hut (near a road otherwise cancel)
09-28-2004, 12:02 AM#2
Moose-Head_Man
that i really have no idea with all my knowledge of triggers how to do, mind you i dont have the WE open atm... but still that seems mighty difficult, i am going to give rep to whoever solves this one

EDIT: ahh i think ih ave solved it! , ok the units that you dont want the road to be nearby will be called "Town" in this example

unit begins constricuion

Unit in construction = Town

set variable "Buildng_Region{1} (region variable on top of unit in construction)

then in the construction of the road, make sure the road is not touching the regions! g2g so i typed this fast if you got any questions tell me

(variable needs to be one hella array)
09-28-2004, 12:02 AM#3
th15
Integer comparison - Count number of units in <units within 256.00 of position of constructing unit matching (unit of type <road>) and (unit <is alive> is true)> = 0
09-28-2004, 12:24 AM#4
Moose-Head_Man
and th15 that is a much better way, if i had the WE open i could find that, but i didn't! great job! didnt even know there was a trigger like that, as i said before REP
09-28-2004, 02:42 AM#5
CCrew
Hrmm sounds good, i havent tried it yet, but im sure it will work!