Greetings friends! You may have noticed the record for tallest building in AoM was smashed in the design contest by the Yeebaapalace in my competition entry. This explains the various appendages of Zeus and other gods that were seen falling from the sky during the construction phase (sorry). So you may want to create a mega-structure of your own. Fear not, it's actually quite simple. This guide assumes a basic working knowledge of triggers and quest vars.
The building does take a little bit of work but once you understand the basics it's pretty easy. Making a large structure requires a lot of trial and error. We will need to understand:
That's it...
The Yeebaapalace building was built relative to a small blueprint on the ground, so we must first understand some vectors. Each 1x1 terrain square in the editor counts as 2x2 in terms of vectors. This applies in everyday triggers - so if you have an arcus 2 units away from an anubite - the anubite will be on the adjacent square. Same thing applies when scaled up, so when you paint terrain using the 10x10 brush, you are painting an area 20x20 as far as vectors are concerned.
The bottom of the map is always X0,Y0,Z0.
Now we can be certain of our vectors using the ingame align tool which will snap a unit to the centre of an editor square.
Y is height. X and Z are across.
Building relative to something allows you the option of change later on so I would say it's important! If you create your structure relative to one unit you can move the entire thing across the map with ease.
These are the following steps to creating a very basic floating building. We're going to stack three columns on top of each other.
You will need a column on the ground to act as your anchor point (the other two will spawn on top of it), and 4 cinematic blocks.
Reveal code for this trigger by clicking.
<Effect name="Unit Position To QV Vector"> <Param name="SrcObject" dispName="Source Unit" VarType="unit">default</Param> <Param name="VQVName" dispName="Vector Name" VarType="string">V1</Param> <Command>trVectorQuestVarSet("%VQVName%", kbGetBlockPosition("%SrcObject%"));</Command> </Effect>
To make step 6 simple I have create a custom trigger which combines vector modify and unit teleport all in one. So just set Y to +4 and select a different amanra each time and it will work.
Reveal code for this trigger by clicking.
<Effect name="Quest Var Vector Modify and teleport"> <Param name="VQVName" dispName="Vector Name" VarType="string">V1</Param> <Param name="Oper" dispName="$$23955$$Operator" VarType="string">+</Param> <Param name="X" dispName="Vector X" VarType="float">0</Param> <Param name="Y" dispName="Vector Y" VarType="float">0</Param> <Param name="Z" dispName="Vector Z" VarType="float">0</Param> <Param name="R" dispName="Round" varType="bool">false</Param> <Param name="SrcObject" dispName="$$22295$$Source Units" varType="unit">default</Param> <Command>trVectorQuestVarSet("%VQVName%", xsVectorSet(trVectorQuestVarGetX("%VQVName%") %Oper% %X%,trVectorQuestVarGetY("%VQVName%") %Oper% %Y%,trVectorQuestVarGetZ("%VQVName%") %Oper% %Z%));</Command> <Command>if(%R%) { for(a=0; >1){}for(b=0; >1){}for(c=0; >1){}</Command> <Command>a = trVectorQuestVarGetX("%VQVName%");b = trVectorQuestVarGetY("%VQVName%");c = trVectorQuestVarGetZ("%VQVName%");</Command> <Command>trVectorQuestVarSet("%VQVName%",xsVectorSet(a,b,c));}</Command> <Command>trUnitSelectClear();</Command> <Command loop="" loopParm="SrcObject">trUnitSelect("%SrcObject%");</Command> <Command>trUnitTeleport(trVectorQuestVarGetX("%VQVName%"),trVectorQuestVarGetY("%VQVName%"),trVectorQuestVarGetZ("%VQVName%"));</Command> </Effect>
Here is a screenshot series of the steps:
| | | | |
You will see once transformed correctly the wadjet spit appears to make the unit float a little bit. If you're having trouble make sure you have LOS to all objects, and you MUST use transform/mutate - do not use change unit type.
Let's add some more units.
You will see in this picture my columns are actually 3 editor squares or 6 units apart, why? You can see the fallen columns perfectly take up two squares each. However if you imagine hoisting them into the air they start from the edge of the editor square rather than our columns which are in the centre - as I have illustrated. That is the reason for my offset.
Now we can prepare the fallen columns for floating by using our previous 6 steps. You will have to now time the triggers differently as you cannot transform a unit to two different units in the same trigger. So I've created my 6 steps again but the original 6th step now fires the first step for the column building. No need to set any vectors this time though, we can just +4Y to V1 and V2 and the fallen columns should sit neatly on top of our columns.... But do they?
So you will notice the angles are off! This is because the relic assumes the angle of the hero that is holding it. So you'll need to use the set unit heading trigger on the amanra that picks up the relic which will become our fallen columns (0 and 180).
The position also appears to be off as well, this is due to the centre point of the fallen column. But we can correct this easily. We know it's 4 units long so we just need to halve this and offset by Z-2 in V1 and Z+2 in V2. Combined with unit heading we now have a sexy archway which units can walk through. They won't be able to walk through the sides since we put physical columns down to create our stack. If we stacked on a cinematic block then units would be able to walk through.
So you have now learnt that the unit heading property of the hero will be applied to the relic. This applies to other properties as well such as animation.
Let's recreate a classic scene from the crystal maze and finally get a unit to walk over the bridge AoM provides!
Our setup will be the bridge unit, with two cinematic blocks at each end. We will need to use our first six steps, but our unit of choice is a militia. This won't do - if you try it the unit will be idle. We need our militia in the walking animation when he is transformed to a relic.
So have your militia in the editor. Use move to unit (block 1) to get him to run in the same direction of the bridge. One second later we do the transform and garrison trick, changing block 2 to amanra and using immediate garrison in the same trigger.
If this has worked correctly you will have a militia in the walking animation suspended slightly above ground. We do not create a relic for this - we transform the militia into a relic, garrison and then transform back.
Add another militia and use the same trick so we have a stationary militia and a walking one.
We can now set V1 to block 3, and modify the Y height. This part takes trial and error! I'll save you some work and ask you to set the height to +12.2Y. You now have a militia standing on the bridge with the walking animation. He may be floating slightly, as the value I have given you is for the centre of the bridge since the unit dips slightly at each end.
Now that we've done that - we must simulate walking. In my setup the distance between the two cine blocks on the bridge is 11 editor squares, so I want my militia to move 22 vector units.
This is done with a very simple trigger. Add a new trigger for our movement. Fire the movement trigger from the trigger where your militia is put onto the bridge, and set a quest var. Let's call it 'Distance' and set it to 22.
In our movement trigger (this must be looped), condition is QV check for distance being greater than 0. Also we have a timer ms
This will create a smooth movement so our unit will walk across the bridge and then freeze at the end! Animation cannot be changed by modifying the original unit.
At the end he's still walking, so add a final trigger where when Distance is equal to or less than 0, our moving militia is teleported off screen and our stationary militia is teleported to V1 (this is handy - exactly where our walking unit was!).
You can now take this to the next level. Using these principles you too can have a unit walk the misc stairs!
You can create pathways out of thin air and maybe even automaton bases as stairs and have your units walk up them.
Interestingly, stretch and scale is also preserved with transform so with 2.8 making this so easy you can do some proper whacky builds. I look forward to seeing what you can make. It's even possible to do this trick online.
"You can't trust yeebaagooon to lead a rebelion, He would send everyone to steal mirrors so he could bask in his own brilliance." - Out Reach
"Yeebaagooon had never seen a more handsome man in all his life. He couldn't control himself, He needed to act. Gripping the mirror in his strong arms he kissed the figure before him..." - Out Reach
AoMH: Unfinished Scenarios|Singleplayer: Codename Ripto|Multiplayer: Minigames Z|CSC 7
Ex Seraphs Dictator, Spore Heaven Seraph