HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

unit enters region

02-07-2004, 05:47 PM#1
Dark Illidan
how would you make it so that an action triggers when TWO untis enter a region? i need this for a map im working on
02-07-2004, 05:51 PM#2
Shark
booleans....
eg

trigger 1:

e: unit enters region
C:unit type is something
A: set UnitOneIn = true

trigger 2:

e: unit enters region
C: unit type is something2
A: set UnitTwoIn = true

trigger 3

E: unit enters region
C:entering unit type is something1 or something 2 (two lines)
C: UnitOneIn and UnitTwoIn equal to True (two lines)
A: your action here..

thats the triggers, u need to fill em in with your stuff and values
02-07-2004, 05:58 PM#3
AllPainful
Or
Code:
Event
  Unit enters region
Conditions
  Units owned by (player(owner of(entering unit))) in region is greater than 1
Actions
  ..............

Also note.. you would need to make some other triggers to change the variable to false when the units exit the region if you use sharks triggers.
02-07-2004, 06:01 PM#4
Shark
well, that can work too, its for any two units....
i assumed that he's working on an RPG or Aeos whatever the name is, and he needs the trigger when 2 player heros enter the region...
did i get it right ?:)
02-07-2004, 06:04 PM#5
AllPainful
Thats why I didn't say your Idea was a bad one, because in some situations your trigger is the better one Shark.
02-07-2004, 06:17 PM#6
Dark Illidan
im lazy, so is there any way to do it good with only one trigger, and they arent ownd by the same player, so it could any to players from a player group
02-07-2004, 06:23 PM#7
Shark
sounds like u have to use my trigger....
but u can shorten it a bit by using

E:Unit enters region
C:unit type is something 1
c: unit type is something 2
A: if entering unit type is something 1, set UnitOneIn equal to true, else do nothing
A:if entering unit type is something 2, est UnitTwoIn equal to true, else do nothing...

this is simply a merging of "Set Boolean to True" triggers....u still have to have 2 (or 3) tho...
02-07-2004, 09:28 PM#8
AllPainful
Or you could use mine, just change the condition
Code:
Event
  Unit enters region
Conditions
  Count - Units in region is greater than 1
Actions
  ..............
02-07-2004, 10:01 PM#9
Dark Illidan
thanks for all of your help, i think im going to use both, for different thing though, but this was a great help