Game Development Community

saving mission name to mission file

by Desmond Fletcher · in Torque Game Engine · 01/17/2002 (3:52 pm) · 3 replies

Can someone tell me what part of the code writes the mission file when saving after an edit?

I want the mission name to also be saved in the MissionInfo section of the mission file instead of staying "newMission" and having to manually change the mission file.

#1
01/24/2002 (8:37 am)
Anyone? What part of the code writes this section to a new mission file?

new ScriptObject(MissionInfo) {
name = "New Mission";
desc0 = "A simple new mission template.";
descLines = "2";
};
#2
01/24/2002 (10:39 am)
You probably aren't going to be concerned with the code that writes to the file (SimObject::write and SimObject::writeFields), but rather, you need the editor to be modified to allow you to change the "name" field of the MissionInfo object before writing it out.

(BTW I'm actually a little puzzled that SimObject::writeFields writes out anything at all for the contents of MissionInfo, as none of those fields ("name", "descLines", "desc0") have been registered via addField for the ScriptObject class or any of its parent classes. But obviously I'm missing something.)
#3
01/24/2002 (1:09 pm)
At least as a default, it should write out the name supplied when you do a "Save As" into the MissionInfo section.