Welcome! Please Login or Register!
September 27, 2020, 02:46:11 AM
Home Login Register
pftq Forums  |  Game Design  |  Age of Empires III  |  Editor command triggers 0 Members and 1 Guest are viewing this topic. « previous next »
Latest News!VR Jetpack Game Trailer and Music(Jul 29, 2019)
Pages: [1] Print
Author Topic: Editor command triggers  (Read 4275 times)
nottud
Member
*****
Offline Offline

Posts: 3

« on: September 21, 2007, 02:32:37 PM »

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:

Code:
   <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:

Code:
   <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?
Logged
pftq
Administrator
*****
Offline Offline



Posts: 4132

WWW
« Reply #1 on: September 21, 2007, 06:41:52 PM »

It is probably a different command (such as the fact you use modeEnter instead of subModeEnter) - Really can't say as I don't have the game with me at the moment.

However, not everything was transfered from AOM to AOE3 - kb Army commands for example do not exist in AOE3 (not in same command names anyways).
Logged
nottud
Member
*****
Offline Offline

Posts: 3

« Reply #2 on: September 22, 2007, 12:33:38 AM »

The sub mode commands don't exist in AOEIII but mode enter does and I have found out that the editor seems to be a seperate mode now, not a sub mode.  I wish I could get it working!

Like I say the mode switching works fine, it is just that the command I want to run doesn't.
Logged
Pages: [1] Print 
pftq Forums  |  Game Design  |  Age of Empires III  |  Editor command triggers « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines | RSS Feed Valid XHTML 1.0! Valid CSS!
Page created in 0.477 seconds with 21 queries.