Game Development Community

Call a local 'mis-file' to start up :-).

by Jan Sorensen · in Torque Game Engine · 05/18/2011 (9:58 am) · 4 replies

Hi here and please help :-).

I want to call a local mission file from a CS-function, but I have problems with 'the syntax', can anyone here give me a hint.

In a 'trigger':
missionName = "fps/data/missions/Intro.mis";

In a GUI-button:
command = "LokalMission(\"fps/data/missions/_Intro.mis\");";

A call from a 'Script-function':
?????

Jan :-).

#1
05/18/2011 (10:07 am)
I don't have TGE installed, and since the actual mission/server loading/start commands have evolved over time I can't be specific about the actual function name, but basically from your trigger/button you would have to make a call to loadLevel() -- or equivalent function -- and pass in the desired mission to load as a parameter.
#2
05/19/2011 (1:06 pm)
Hi Michael :-).

Yes I understand. But as I write I have try many thing in the call to 'LokalMission', but i get a syntax error every time I try to setup the function call. I think it must be a minor problem for them there can.

Jan :-).
#3
05/19/2011 (1:21 pm)
Here's my latest experiment ... and then 'died' Torque :-O ..

if(%guest $= %owner) {
LokalMission("fps/data/missions/_Intro.mis");
return;
}

But now without a 'Syntax error' in the console ?...

I must make it absolutely wrong?
#4
05/19/2011 (2:02 pm)
Hi again to a little talk to, (mostly to myself) :-D.

I found an apparent solution. The call must be moved from the client to server part and look like this, it's works:

if(%guest $= %owner) {
commandToClient(%client, 'GotoLocalServer', "fps/data/missions/_Intro.mis");
return;
}

Just that and thanks, Jan :-).