[Help Needed] 'GetSelected' in the editor??
by Nicolai Dutka · in Torque Game Engine Advanced · 10/06/2009 (1:35 pm) · 1 replies
I'd like to be able to do the following:
Bind a command to a keyboard button
Click on an object in the editor
Push my key bind to run the desired command on the selected object
I've got everything working except... I don't know how to tell the command which object to effect.
In my commands.cs I see a 'serverCmdSetSelectedObject', but I don't see anything for 'getSelectedObject'...
Bind a command to a keyboard button
Click on an object in the editor
Push my key bind to run the desired command on the selected object
I've got everything working except... I don't know how to tell the command which object to effect.
In my commands.cs I see a 'serverCmdSetSelectedObject', but I don't see anything for 'getSelectedObject'...
Torque 3D Owner Nicolai Dutka
Game/tools/missionEditor/scripts/editors/worldEditor.ed.cs
Line 83:
function WorldEditor::onClick( %this, %obj ) { Inspector.inspect( %obj ); InspectorNameEdit.setValue( %obj.getName() ); $selected = %obj; }Now I can run commands on "$selected". :)