Game Development Community

T3D Beta 2 Bug - FPS Kit - Mission Area

by Aldavidson · in Torque 3D Professional · 06/10/2009 (3:44 am) · 5 replies

Just had a little play with the mission area, and when my player exits it, I get no notification or anything.

Their are scripts in place that should do this, but the functionality seems to be b0rked.

function GameConnection::onLeaveMissionArea(%this)
{
    // The control objects invoke this method when they
    // move out of the mission area.

    messageClient(%this, 'MsgClientJoin', 'c2Now leaving the mission area!');
    %this.player.OOB = true;
    commandToClient(%this, 'OutOfBounds', %this.player);
}

#2
06/10/2009 (9:34 am)
Use "GlobalMissionArea", the Missiona Area notification and punishment works. If I remember correctly you can only have one Mission Area in a level.

How did you add a mission area? I could have sworn that the mission area editor was turned off.
#3
06/10/2009 (9:36 am)
There is one by default in the Warrior Camp Level, that i was playing with ^.^

Thanks alot for pointing out the specific name thing, i feel slightly retarded that i overlooked that, but i guess thats what time constraints do to you.
#4
06/10/2009 (10:20 am)
Ah, I suppose the levels need to be updated then, there's still several areas of legacy holdover in some of them. I never actually paid any attention to it, until now.

May cause some confusion and some trial & error experimentation trying to adjust the area without the mission area editor though -- I don't even think the boundary itself shows up in the editor like it used to.

Here's a small mission area that I set up for testing that code with in a "playground" level I use:
new MissionArea(GlobalMissionArea) 
{
    canSaveDynamicFields = "1";
    Area = "-100 -100 200 200";
    flightCeiling = "300";
    flightCeilingRange = "20";
    Enabled = "1";
    locked = "true";
};
The "Area" is the X & Y extents from position (0, 0).
"-X -Y X Y"
#5
06/10/2009 (10:25 am)
Check this out if you want the mission area to render when in editor mode;

www.garagegames.com/community/forums/viewthread/91611