mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
ObjectBuilderGui augs
1) adds a buildAIPlayer entry so we can tag it as a bot while still using the normal playerdata datablock 2) adds a "contol?" tickbox for player, and the 3 vehicle types when spawning one that will put the editor directly into control on creation
This commit is contained in:
parent
78b56688d3
commit
fb6ec7bb6e
1 changed files with 43 additions and 0 deletions
|
|
@ -969,6 +969,10 @@ function ObjectBuilderGui::processNewObject(%this, %obj)
|
||||||
if ( !isObject( %obj ) )
|
if ( !isObject( %obj ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
%controlMask = $TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType;
|
||||||
|
if (%obj.control)
|
||||||
|
localClientConnection.setControlobject(%obj);
|
||||||
|
|
||||||
// Add the object to the group.
|
// Add the object to the group.
|
||||||
if( %this.objectGroup !$= "" )
|
if( %this.objectGroup !$= "" )
|
||||||
%this.objectGroup.add( %obj );
|
%this.objectGroup.add( %obj );
|
||||||
|
|
@ -1459,6 +1463,45 @@ function ObjectBuilderGui::buildPlayerDropPoint(%this)
|
||||||
%this.process();
|
%this.process();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ObjectBuilderGui::buildPlayer(%this)
|
||||||
|
{
|
||||||
|
%this.objectClassName = "Player";
|
||||||
|
%this.addField("dataBlock", "TypeDataBlock", "dataBlock", "PlayerData");
|
||||||
|
%this.addField("control", "TypeBool", "control?", "false");
|
||||||
|
%this.process();
|
||||||
|
}
|
||||||
|
|
||||||
|
function ObjectBuilderGui::buildAIPlayer(%this)
|
||||||
|
{
|
||||||
|
%this.objectClassName = "AIPlayer";
|
||||||
|
%this.addField("dataBlock", "TypeDataBlock", "dataBlock", "PlayerData");
|
||||||
|
%this.process();
|
||||||
|
}
|
||||||
|
|
||||||
|
function ObjectBuilderGui::buildWheeledVehicle(%this)
|
||||||
|
{
|
||||||
|
%this.objectClassName = "Player";
|
||||||
|
%this.addField("dataBlock", "TypeDataBlock", "dataBlock", "WheeledVehicleData");
|
||||||
|
%this.addField("control", "TypeBool", "control?", "false");
|
||||||
|
%this.process();
|
||||||
|
}
|
||||||
|
|
||||||
|
function ObjectBuilderGui::buildHoverVehicle(%this)
|
||||||
|
{
|
||||||
|
%this.objectClassName = "Player";
|
||||||
|
%this.addField("dataBlock", "TypeDataBlock", "dataBlock", "HoverVehicleData");
|
||||||
|
%this.addField("control", "TypeBool", "control?", "false");
|
||||||
|
%this.process();
|
||||||
|
}
|
||||||
|
|
||||||
|
function ObjectBuilderGui::buildFlyingVehicle(%this)
|
||||||
|
{
|
||||||
|
%this.objectClassName = "Player";
|
||||||
|
%this.addField("dataBlock", "TypeDataBlock", "dataBlock", "FlyingVehicleData");
|
||||||
|
%this.addField("control", "TypeBool", "control?", "false");
|
||||||
|
%this.process();
|
||||||
|
}
|
||||||
|
|
||||||
function ObjectBuilderGui::buildObserverDropPoint(%this)
|
function ObjectBuilderGui::buildObserverDropPoint(%this)
|
||||||
{
|
{
|
||||||
%this.objectClassName = "SpawnSphere";
|
%this.objectClassName = "SpawnSphere";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue