From fb6ec7bb6e958cbe6f4d90057aad58ce3db9db7f Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 8 Jan 2024 19:28:38 -0600 Subject: [PATCH] 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 --- .../worldEditor/gui/objectBuilderGui.ed.gui | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui index ae5072029..dfec78a14 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui @@ -969,6 +969,10 @@ function ObjectBuilderGui::processNewObject(%this, %obj) if ( !isObject( %obj ) ) return; + %controlMask = $TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType; + if (%obj.control) + localClientConnection.setControlobject(%obj); + // Add the object to the group. if( %this.objectGroup !$= "" ) %this.objectGroup.add( %obj ); @@ -1459,6 +1463,45 @@ function ObjectBuilderGui::buildPlayerDropPoint(%this) %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) { %this.objectClassName = "SpawnSphere";