Mission Types
by Jon Jorajuria · in Torque Game Engine · 02/03/2006 (4:02 pm) · 1 replies
I have been failing at getting three mission types with a base superclass default mission implemented in my game. So in the interest of time, I was wondering if it were possible to have three seperate game.cs files that would be called based upon information in the *.mis files. For example:
Game *.cs files.
FFA.cs
TDM.cs
CTF.cs
*.mis file info:
Game *.cs files.
FFA.cs
TDM.cs
CTF.cs
*.mis file info:
new ScriptObject(MissionInfo) {
name = "Stronghold";
gametype = "FFA";
descLines = "2";
desc0 = "This death match mission takes place in a small orc village. There are no teams, every orc is your enemy!";
};What I would like to do is call the FFA.cs if any missions are loaded with that gametype info. Any suggestions would be welcome, I am a major time crunch. Thank you in advanced for your time.About the author
Torque Owner Jeff White
E.g.
// in mission file $MissionInfo = new ScriptObject(MissionInfo) { ... function onMissionLoaded() { if ($MissionInfo.gametype $= "FFA") { exec("FFA.cs"); } startGame(); }I am not sure this will work, but might put you in the right direction.
-Jeff