Game Development Community

How to get the local "player" ?

by Paulo Coutinho · in General Discussion · 12/09/2009 (8:05 pm) · 1 replies

Hi.

Im using T3D and follow the example of "RTS Prototype" on Torque Docs that we have to access the "current player" to move it to other position.

The code is this(playGui.cs):

ClientGroup.getObject(0).player.setMoveDestination( getWords(%scanTarg, 1, 3) );

But when i play the game and right click the map, i got the error on console log:

scripts/gui/playGui.cs (95): Unknown command setMoveDestination.

Im try the above code and this:

LocalClientConnection.player.setMoveDestination( getWords(%scanTarg, 1, 3) );

But i got the same error.

What i have to do?

#1
12/09/2009 (8:17 pm)
No More!!

Problem solved!

We have to change the propertie "spawnClass" to "AIPlayer" of "Player Spawn" on editor.

Thx.