I have designed a load of triggers for AOM which switches the game to editor mode, runs a command then switches the game back to game mode. I have got the non expansion of the game but I am struggling to make it work here. I have managed to make the mode switch to work but when I run the editor command there is no effect! I have checked the console and all the commands are there - The triggers work i.e. the game recognises the commands but nothing happens. Why is this? One of these cool editor mode triggers is:
<Effect name="zMake everywhere a terrain type">
<Param name="t" dispName="new terrain" VarType="string">SnowB</Param>
<Command>subModeEnter("Simulation", "Editor");</Command>
<Command>terrainPaint("%t%");</Command>
<Command>subModeLeave("Simulation", "Editor");</Command>
<Command>modeEnter("pregame");</Command>
<Command>modeEnter("Simulation");</Command>
<Command>subModeEnter("Simulation", "Singleplayer");</Command>
</Effect>
This trigger changes all the terrain on the map to one of your choice - passability is not changes meaning you can make people walk on impassable terrain! Other triggers I made like this are Raise/lower all terrain on map, smoothen map, toggle camera limit and more.
I did make an AOE III version that looked like this:
<Effect name="zMake everywhere a terrain type">
<Param name="t" dispName="new terrain" VarType="string">Water</Param>
<Command>modeEnter("editor");</Command>
<Command>terrainPaint("%t%");</Command>
<Command>modeEnter("singleplayer");</Command>
</Effect>
(Water is a hidden terrain type on AOEIII that appears white if painted on land)
Currently, I am the only person who knows how to make triggers by switching mode so do not worry if you do not understand it. The reason for all the complicated mode switching on AOM is very complex. It was the only combination of mode switching that didn't cause crashes on multiplayer games.
Anyway, the AOEIII version does not work but I don't know why it doesn't work because it should. My current verdict is that the mode switching on AOEIII cancelles out triggers but if that was the case then why does it switch back to game mode fine? Also - it seems the mode switching on AOEIII is different since the editor is now a seperate mode rather than a sub mode. Pahaps that is why it isn't working.
Anyhow, do you have any ideas why it isn't working?