HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

sorry..(help with a simple trigger)

12-12-2002, 01:02 AM#1
badomen
ok i want all nutral passive peons to change to skeles at 6pm (night) within a region (but if there are heros in there i daont want em to change)

i have tryed lots of triggers but it just wont work....

plz help

thanks
p.s i know its not rocket science but i just cant get it to work...
12-12-2002, 08:12 AM#2
Insaniteus
I'd do this as follows. This needs a unit group variable CheckHero

Event - Time is 6:00
Actions - Clear unit group CheckHero
----------- Pick every unit in Region matching conditions matching unit is a hero and add picked unit to unit group CheckHero
------------If number of units in CheckHero greater than 0 then skip remaining action else do nothing
------------Pick every unit in Region of type peons and if owner of picked unit = to neutral passive replace picked unit with a skeleton else do nothing

That should work, unless I made a typo.

-Insaniteus-
12-12-2002, 01:51 PM#3
Deicide
A simpler way:

Event: Game - Time of the Day is 18:00
Condition: Integer Comparision - Count Units In <Units in [REGION] matching <Matching Unit is a Hero>> is less than or equal to zero

Actions:

Pick Up Every Unit in <Units in [REGION] matching <Matching Unit is a Peon> and <Owner of Matching Unit is [PASSIVE PLAYER]>> and do Replace Picked Unit with Skeleton Warrior
12-12-2002, 09:45 PM#4
DemonicSoul
uhhhh deicide why do u have that integer comparison in there???
12-12-2002, 10:29 PM#5
Deicide
To see if there's no heroes in the region. If I understood right, the peasants only turn into skeletons if there's no heroes there.