HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Ugh Definatly need some trigger help.

05-18-2002, 11:07 PM#1
Guest
This is driving me crazy.

lets say 2 or more of one unit go into a region and turn into a whole different unit. I want to be able to have 2 or more units that are of different unit-types to be able to do the same thing too. Ive gotten pretty far in trying to get this to work. Yet i must make a trigger that will make sure that ONLY a certain unit type AND number of units will turn into this.

I have tried everything to try to get this work and i have failed. ANy ideas?
05-18-2002, 11:23 PM#2
Guest
My suggestion would be:
Event : Unit enters region
Condition : Unit type of (triggring unit) equal to (type A)
Action :
Pick every unit in (units in region) and do (if (unit type of (picked unit) equals (type B)) then do (create new unit of type C) else (do nothing)
for each (integer A) from 1 to (Number of units in (units in region matching condition (unit type of matched unit equals type C)) do (remove 1 unit of type A)
for each (integer A) from 1 to (Number of units in (units in region matching condition (unit type of matched unit equals type C)) do (remove 1 unit of type B)

This will turn unit of type A and unit of type B into a unit of type C when they enter a region, and I think that's what you wanted ot do. There's probably an easier way, but this is what popped off the top of my head. ;)
05-19-2002, 01:29 AM#3
Guest
Thats good an all. but not all the time does unit type A enter last. what if unit type a enters first, and b is the one to trigger it? then it doesnt work at all. I know you can just reverse it but this is gonna be a trigger for like alot of unit types so i want to have an easy code. Actually i think ive gotten all figured out i just hope theres a simplier code to make sure this kind of situation works:

To get a certain unit type, you need to place 3 units that are of different units types (say a grunt, a footman, a ghoul). and once all three of those are in, it turns into a 1 tottally different unit.

Remember that im trying to make it to where it does not matter what order you put the units in. Any code will help. even if its a little long as i dont have many triggers that require 3 different units.
05-19-2002, 02:31 AM#4
nicoli_s
u need to use integer conditions. if u wnat a ghoul acolyte and lets say abomination. u have a condition of and and have one of those conditions be an and have integer of number of units in certain region of type equla to 1 and have one of those for all 3 linked together and then do either create unit or remove the units and create unit