| 07-19-2004, 02:22 AM | #1 |
Does anyone know how to make it so when a certain # of units go into a region they'll morph into something else? (I.E. those old SC maps like FF7vsFF8) |
| 07-19-2004, 05:22 AM | #2 |
another easy one (if i understand) (i can do this but you might not get the morph part) Events: Unit- A unit enters (w/e region) Conditions: NONE Actions: Replace Triggering unit with (w/e unit you wanted it to "morph into") hope this works ![]() |
| 07-19-2004, 05:37 AM | #3 |
he said "certain # of units", not each unit. I think he means if 5 footmen for example enter a region they turn into 1 dragon or something. You could either do it by removing each unit as it gets there and incrementing a certain counter, and after the coutner reaches a certain value create the new unit, or you could run a check each time a unit enters the area, checking the number of units of the same unit-type of the same player in that region. The 2nd way is more elegant as it allows several players to have units in the same region at once without interfering and also allows you to move your units out if you don't have enough and decide to change your mind. The trigger will look something like this: Events: Unit enters region X Actions: If (number of units of (Owner of (Triggering Unit)) of type [unit-type] is equal to #) then: Pick every unit of (Owner of (Triggering Unit)) of type [unit-type] in region X and do: remove triggering unit Create 1 [unit-type1] in center of region X for Player (Owner of (Triggering Unit)) endif |
| 07-19-2004, 05:55 AM | #4 |
no no no easier way Events: A unit enters (w/e region) Conditions: Number of units in (Units in (Playable map area))) Equal to (x) Actions: Remove units in (w/e region) Create (w/e unit) at (w/e region) that should wrap it up ![]() |
| 07-19-2004, 09:19 AM | #5 | |
Quote:
|
| 07-19-2004, 02:21 PM | #6 | |
Quote:
_________________________________________________________________ Fine then do Events: A unit enters (w/e region) Conditions: Number of units in (Units in (Playable map area))) Equal to (x) Owner of (Triggering Unit) Equal to (w/e player) (Unit-type of (w/e unit)) is a unit Equal to True Actions: Remove units in (w/e region) Create (w/e unit) at (w/e region) |
| 07-19-2004, 05:49 PM | #7 | |
Quote:
|
| 07-19-2004, 06:33 PM | #8 |
R3n3g4d3, your solution has a typo in it as well ;) : Events: Unit enters region X Actions: If (number of units of (Owner of (Triggering Unit)) of type [unit-type] is equal to #) then: Pick every unit of (Owner of (Triggering Unit)) of type [unit-type] in region X and do: remove triggering unit Create 1 [unit-type1] in center of region X for Player (Owner of (Triggering Unit)) endif You forgot the region in the integer comparison: If (number of units of (Owner of (Triggering Unit)) of type [unit-type] in region X is equal to #) But anyway, yeah, this trigger does what Archer wanted, Spartan, your triggers just don't work. |
| 07-21-2004, 06:04 PM | #9 |
Thanks R3N3G4D3, That'll work for what I need. ![]() |
| 07-22-2004, 01:51 AM | #10 |
hmmm I can't seem to find this. Code:
If (number of units of (Owner of (Triggering Unit)) of type [unit-type] is equal to #) I know it's probably an integer but I can't find it |
| 07-22-2004, 06:48 PM | #11 |
Apparently there is no single condition covering all of this (player, unit-type, and region). But you can use "Units in region matching condition" and then use "and" (because you have 2 conditions) and pick "matching unit is of type" and "owner of matching unit is player #". |
