Advanced Scripting Here's where I impart my knowledge of Advanced Scripting. Actions covered here are ACLI, GEOM, MOMA, and DELA among others. TABLE OF CONTENTS • ACLI - The Merits of the Action List - Randomization™ •Squads, Platoons, and Platoon Movements - SQUA - PLAT - PLMO • GEOM - How to use these bad mofo's! • More GEOM - Testing for Projectiles - "Tested Items Inside (Location) Field Name" - Continuous-feed Geoms • MOMA - Moving Markers - In combination with GEOM • DELA - Basic explanation • SECRETS of LOATHING - monster_identifier targ - flag onii - world_point_2d pnts - others? ACLI Action Lists can activate several actions at once. "So what? You can do that with multiple links in the acos!" Well, it is often easier to just have ONE action in the acos, and make sure all the actions you want to happen are in the ACLI. It is less confusing. But there is another merit of Action Lists. This is Randomization. One of the abilities of the ACLI is something called the Random Selection flag. When this is used, only ONE of the actions in the ACLI will be activated. One, randomly. Aside from making this randomize two actions, it can also randomize order. Say waves of attacks are activated by CTRL actions. If you have two waves, you can duplicate the CTRL's and give the second group trigger times. Then make an ACLI that activates the first wave and the delayed second wave. Make another ACLI that activates the second wave and the delayed first wave. Make a third ACLI that randomly chooses between these two ACLI's. BAM, you've got yourself a randomized attack order. The same principle can be used to randomize any number of waves. SQUADS, PLATOONS, AND PLATOON MOVEMENTS Squads, Platoons, and Platoon Movements are GREAT actions that no mapmapker can do without. They allow patrols or groups to move around the map in a formation or combination of formations (even a smiley face with the circle, box, and deep arc formations), and attack the player (although other triggers are also usually used.) Squads are groups of units. These groups can be specified to move in a certain formation, and in any relation to each other. Platoons are groups of squads. Platoon movements are the route the platoons take. In a squad, first add a link to a subj list of the units you want to be in the squad. There are several other things you have to specify - the formation via its corresponding number (0 = short line, 1 = long line, 2 = loose line, etc.) and the centerpoint. Dont put anything for facing. Listen closely: The PLATOON will also have centerpoint when we get to that. The centerpoint of the SQUAD in relation to the centerpoint of the PLATOON determines where it walks. If you want Fetch to walk in front of the thrall, have the Fetch squad's centerpoint be in front of the centerpoint for the thrall squad. if you want the Soulless to go to the left of the thrall, have the centerpoint for the Soulless squad be to the left of the centerpoint of the thrall squad. So you could have any number of elaborate formation combinations in a platoon - a circle of thrall, a couple of boxes of soulless, a deep arc of myrmidons to have a smiley face of enemys advancing on you =) The PLATOON has four things you must specify: Under Initial State link the Platoon Movement you are about to make. Under Initial Squads list all your squads. Under Centerpoint put a point in the middle of the men somewhere - its the squad's centerpoints that matter, this could theoretically be on the other end of the map. For facing, just click and drag an arrow in the world view the direction they will initially be facing although this doesnt really matter. For PLATOON MOVEMENT, click on a route you want the units to follow across the map. Put a small radius of 2 for Waypoint Radii to add a little randomness. For "Radii" put two values, both the same: 20 and 20. These dont really matter as they wont be what triggers your PLAT to attack if you do what I'm about to tell you. Add a loop flag if you want them to follow a route. If your waypoints are far apart and you have different types of units with different speeds, you may want to interpolate the waypoints - this means that if you add an intrpolate flag and interpolate spacing of, say, 5, then every 5 World Units the fast guys will stop and wait for the rest to catch up. Very useful. Now GO BACK AND ATTACH THIS ACTION TO THE PLATOON. Dont forget like I always do, its damn annoying! Now, add some damage and proximity TUNI tests like I specified under TUNI and you have a patrol that goes around the map and attacks! NOTE - If you want the platoon to abandon the chase when units lead it too far away from its route, DONT use damage and proximity tests! Rely on the "Radius" and make the radius big enough - say 28 or so - such that archers cannot attack them without being attacked. GEOM actions (Geometry Filters) These are some of the most complicated actions in Myth. Listen VERY closely. Geometries are used to filter out certain units and place these units into an empty "container action" as subj's, obje's, or anything else (which is way too complicated to even get into. Subj and obje are what is used the vast majority of the time.) You can then trigger another action to occur once some units are in this container action and which applies only to them. Say you want the enemy to attack ONLY your units which go into a certain area. Obviously, TUNI will not work. You can test for units in that area. But the enemy will not know which guys to attack. First you need a subject of the GEOM actions. These are the units the GEOM looks for. Put a subj list that includes all your guys ("PLAYER FORCES"). Now you can either have a "circle centerpoint," "circle centerpoint (monster)," and "circle radius," or you can have "polygon points," and a "polygon closed flag" to specify the area within which the geometry tests. For the circle, select a point or monster as the centerpoint, and an appropriate radius. For the polygon, simply put points on the map under the "polygon points." Now the GEOM will filter out any of the PLAYER FORCES that stray into this area. Now add the string "tested items inside field name." Put "obje" because you want these guys to be the object (targets) of the attack. Now make your container action. Name it <<>>. Thats it. Now go back to the GEOM and add the string "Results action identifier." Select the container you just made. Now make and ATTA (or MELE) action. Add a link. Put the subject list for the attackers and in the same link, the unit container which has the object list of the units that go into the forbidden zone. Go back to the GEOM. Add an "Activates on success" string. Attach the ATTA (or MELE) you just made. Make the GEOM initially active. Congrats! Other things a Geom can be used for include making units turn "blue" (comp controlled) on the overhead when they enter a certain area and do stuff under comp control (think of the final exit of the Myth1 level "Flight from Covenant" or when a dwarf gets close to a magic hole thingy with a glowing stone in "The Summoner"). Do this by linking a CTRL to the GEOM instead of an ATTA and then have the CTRL trigger whatever it is you want them to do. Another example of a VERY ADVANCED Geom is on the level "Shiver" and is duplicated in the upcoming CoD level "Raiders of the Ermine." It is actually used to have Shiver target satchel charges with her explosive spell and blow them up! This is done with neat effects like having the tested items inside field name be "wayp" instead of obje or subj, meaning an attack ground location for an attack, having the circle centerpoint be herself so she looks for satchels around her, and looking for object type "dwsc" the code for satchel charge, instead of looking for units. Check it out in the Shiver scripting! There are limitless things you can do with GEOM if you have enough imagination. MORE GEOM Geom can do even better things. It can test for projectiles around a unit, as was shown with the last paragraph of the above. The thing is, it even works with very small radii. So you can actually tell what projectile caused damage. This is very significant! It means you can actually tell which type of unit did damage or attacked another unit. If you want the enemy to retreat when arrows are shot at him, but not to retreat if attacked by a different projectile, this is the way to do it. The radius of testing can be very small, even as small as 0.2, to ensure greater accuracy. There is also a string called 'Tested Items Inside Location Field Name.' This is used to put a world_point_2d into a container action instead of a monster_ or object_identifier, which is what 'Tested Items Inside Field Name' does. If you want to place the location of a unit or object in a container, this is your man! World_point_2d's are the numbers that appear when you click on the mesh in the world move to put points for a MOVE action, for a SQUAD or PLATOON MOVEMENT, and for a POLYGON. Using this string allows you to look up the correct 4-letter index for that particular world_point, like wayp (for waypoints). You can feed the central point for a radial test, the waypoints for a movement, the location for a platoon to move to, or even the points for a polyon into its action. So if you want a platoon to "hunt" you and follow you around, use the containter of a GEOM with this string as the location to move to in the PLMO. Continuous feed GEOMS can be made very simply by changing the GEOM so it deactivates Never. Experiment - its not as easy as it sounds. MOMA MOMA will move an invisible unit to a location. The only thing you need to know that you can't figure out at this stage is that the unit must have been visible at some time before it is moved. So make the unit visible, and have an initially-active CTRL make it invisible. Then its marker can be moved. Use this for teleportation effects, or other instances where units disappear and are moved to a specific location. Also use it to move units to a location searched for by a GEOM and then teleport in. This is what Soulblighter does on "A Murder of Crows." DELA Cool action. It feeds the subjects to the results action one at a time with the "even distribution" flag over the time specified. So if you want units to attack one at a time, like exploding deer so they aren't all clumped, use this. You can also feed it to a GENE or something to make units in a line do the wave. SECRETS OF LOATHING There is a secret monster_identifier type, called monster_identifier targ, that can be used in the MOMA. When used, the subj of the action will replace the targ of the action. What does this mean? Well, use a CTRL that is triggered by the MOMA to delete the original unit, and you can have the subj, an invisible unit somewhere off the map, take on all the characteristics of the targ! THE MONSTER TAGS ARE SWAPPED IN-GAME! Wow, no? What does this mean? Well, it means that a unit can be changed into a new unit with different attributes, maintaining the same name, the same flavor, the same health level, the same experience, and the same facing of the original - it is a seamless switch. Let me give a couple examples: A "Borg" unit that becomes resistant to whatever hits it. When hit with a certain projectile,, say a molotov doing "explosive" damage, tested for by a GEOM projectile test, a new unit resistant to that type of damage is targed over onto the original seamlessly. Now, explosives will hardly hurt it. Also triggered will be a new set of GEOM tests for damage types that will trigger the targing of a unit resistant to explosives AND the new type! So keep hitting it in order with everything you've got! A unit that mounts a horse or a wolf or something. As long as you have the animations for the subj and the targ all in one collection, you can have units go up to horses, and targ into a horseback rider, CTRLing away the old units. A "mounting" animation with the "entrance projectile group" in Fear can make it seamless. You can also have the death of a mounted unit NOT result in death for the rider - like when you test for the unit being at 0.2 health, the new unmounted unit is targed onto the old mounted unit, and the exit projectile group for the old unit contains the horse's death and dead body. Now you've got an unmounted unit with the same name, health, facing, experience etc. of the old. A unit that can switch weapons and switch his entire set of animations - when he picks up something (tested for with a GEOM), the unit using that weapon is targed on. Cool beans, no? There is a secret flag in the CTRL action called "onii." Create a custom onii flag and units will flicker like ghosts. There is a world_point_2d type called "pnts." If you use this as the "location field name" for a GEOM, you can make the points that a unit or object is on impassible.