Game Development Community

About player and setMoveDestination

by Dimitris Matsouliadis · in Torque 3D Professional · 11/08/2013 (1:14 pm) · 6 replies

hello
I dev on T3D 1.2 studio
I need to use the setMoveDestination with a player.
I have spawned the player as AIPlayer but command not working.
I dont get any error, just do not make any move...
What i need set to spawn a Player as an AIPlayer?
or I need to put setMoveDestination code in player class in engine?

Any idea or a working trick?

#1
11/09/2013 (4:19 am)
Do you mean you need your player character to respond to both direct control (e.g., WASD on the keyboard) as well as be able to control them from script or by point-and-click (using setMoveDestination)? If you need both methods it's a bit complicated. If you can get away with one or the other you'll be able to get away without modifying the source code.
#2
11/09/2013 (9:53 am)
Hi Daniel
I have in mind a both system like wow, but on choice i am near to click and move. This time working in both systems very well with one problem, after mouse click cant have the setMoveDestination (working for the time with player.position()).
For this reason i need the player spawn as AIPlayer.
#3
11/09/2013 (10:52 am)
i am working on T3D 2 years ago and 1 year on TGEA previously.
i am near to beta test and i need some changes, one of this is the finnish the click and move system.

My dev is an epic fantasy MMO RPG game.
You can see some pictures of the game

human Dorius region
http://www.pclive.gr/photo/human_dorius.jpg
human Nords region
http://www.pclive.gr/photo/human_Nord.jpg
riding a horse
http://www.pclive.gr/photo/human_NordRide.jpg
systems(inventory, bags, stats, quests, equipment etc)
http://www.pclive.gr/photo/systems.jpg
#4
11/09/2013 (2:14 pm)
Looking good! Except the lycra-clad protagonist ;P. Have you read this? It runs through how to create RTS-like movement.
#5
11/09/2013 (3:53 pm)
@Dimitrus, your game is looking great, I'll be keeping an eye out for that Beta :-)
#6
11/27/2013 (1:39 pm)
David thanks,
Daniel thanks, with some changes like RTS style game is ok now.
example:

function serverCmdSpawnThePlayer(%client)
{
%player = new AiPlayer()
{
dataBlock = "DefaultPlayerData";
path = "";
isbot= "1";
fov = 90;
attentionlevel = -1;
};

MissionCleanup.add(%player);
%client.player = %player;

%Player.position = %client.SpawnPoint;

%client.camera.setOrbitObject(%client.player, mDegToRad(20) @ "0 0", 0, 5.5, 5.5);

%client.camera.camDist = 5.5;
%client.camera.controlMode = "OrbitObject";

}