January 24th, 2007
Posted by pftq

Scatter & Copy Effects for AOM/AOE3

Scatter Effects  

This is perhaps one of the most complex effects I have created. The basic idea is that units in an area “scatter” or move to a random location. There are two effects. One of them, “Random in Area”, will have each unit move to their own random location, in the area you specify. The other one, “From Original Location”, will have each unit move in a random direction from their OWN location.

What am I talking about?

The units in the following picture all started out near the titan. In a single effect, “Scatter - Random in Area”, with the Edge Only enabled, the units are forced to the edge of the area’s radius - each one choosing its own spot.

Units Scattered to Edge of Area

Try doing that with any effects you have prior to this.

Explaining the Fields:
- Unit Type ID - Number that is the id of the protounit or class (AbstractInfantry, Building…) you want. IT IS RECOMMENDED YOU DEFINE THIS. Otherwise the trigger will blindly loop through every unit type in the game, not knowing what to look for specifically (even if you want ALL unit types, use the CLASS ID for “All”). DOWNLOAD THE ID VIEWER EFFECT TO FIND ANY ID YOU WANT. Not defining works but it uses a LOT of memory - if you do use it, do NOT loop without a condition.

- From… - Define a single player to scatter from or have it convert from ALL players (not including the player being converted to obviously).

- Scatter Radius: How far units will go either from - themselves, in “From Original Location” - or the Target, in “Random in Area”.

- Edges Only: This will set it to only fill the perimeter, basically forcing the unit to go exactly to the edge of the radius.

These are the trigger effects included in this set:

Scatter - Random in Area: Units around the CENTER UNIT will go to a random location within SCATTER RADIUS of the TARGET.
Scatter - From Original Location: Units around CENTER UNIT will go to a random location within SCATTER RADIUS of THEMSELVES.

Some things to keep in mind:
- The locations chosen are random - the same location may be chosen twice.
- AOM/AOT Issue: Cinematic Blocks and similar objects do not return Object Info (use object info tool in editor) and cannot be used as target or center unit. Try Invisible Target or other invisible objects that return object info.

Copy Effects

Meanwhile…. I also created this out of a request.
This effect was requested by nottud at aom.heavengames.com

The effect copies units within a set area and pastes them in another area (areas determined by center units). There are two effects, one retains the player owner of each unit, the other converts them to a player. An option is also available to retain unit positions, creating a true Copy effect.

Explaining the Fields:
- Unit Type ID - Number that is the id of the protounit or class (AbstractInfantry, Building…) you want. IT IS RECOMMENDED YOU DEFINE THIS. Otherwise the trigger will blindly loop through every unit type in the game, not knowing what to look for specifically (even if you want ALL unit types, use the CLASS ID for “All”). DOWNLOAD THE ID VIEWER EFFECT TO FIND ANY ID YOU WANT. Not defining works but it uses a LOT of memory - if you do use it, do NOT loop without a condition.

- From… - Define a single player to copy from or have it copy from ALL players

- Retain Unit Positions - Toggle this on to copy the units exactly as they are, including the locations of each unit, in relative to the center unit.

These are the trigger effects included in this set:

Army Copy Units in Area - Retains the owner of each unit, a true copy effect.
Army Copy Units in Area TO PLAYER - converts the units to the player of the army as well.

Some things to keep in mind:
- Army Deploy stops working if the deploy point is full; if this may happen, it’s a good idea to Retain Unit Positions to avoid clogging.
- AOM/AOT Issue: Cinematic Blocks and similar objects do not return Object Info (use object info tool in editor) and cannot be used as target or center unit. Try Invisible Target or other invisible objects that return object info.

191 unique view(s)

Leave a Comment

Name: (Have an account? Login or Register)
Email: (Won't be published)
Website: (Optional)
Comment:
Enter the code from image: