Game Development Community

Set $Game::Duration and $Game::EndGameScore as preferences?

by SqHd · in Torque Game Engine Advanced · 10/21/2009 (10:25 pm) · 2 replies

Hi,

I would like to add $Game::Duration and $Game::EndGameScore as preferences in the startMission.gui (in the Stronghold example). It would be great to have the ability to change the frag count or time limit when hosting a multiplayer game.

Is there an easy way to make these $Pref::Game::Duration or $Pref::Game::EndGameScore?

(Originally, I tried $Pref::Server::TimeLimit but it didn't seem to work...)

Thanks.

#1
10/24/2009 (7:17 am)
If you have a gui that is setting a $pref::TimeLimit, like a popupmenuctrl or something. You should be able to put something like

$Game::Duration = $pref::TimeLimit;

And it should use whatever is set by your gui in the "". I say should, cause I can't test that right now, but give it a try.

Careful though with duration cause it uses a "20 * 60", which i believe sets it to 20 minutes.
#2
10/26/2009 (12:30 pm)
Thanks! I will have to do some testing.