how would I spawn a whelled vehicle
by Anthony Rosenbaum · in Torque Game Engine · 10/23/2001 (1:52 pm) · 2 replies
I could uses command to server to spawn it and that it would appear close to the player but not ontop of him and that it would be high enough that won't get stuck by collision?
Anthony
Anthony
About the author
#2
the answer was
03/29/2003 (10:55 am)
wow this was an old post, solved it along time ago, that for the replythe answer was
if(%client.player.isMounted())
return;
%vehicle = new WheeledVehicle()
{
dataBlock = Vamp;
};
MissionCleanup.add(%vehicle);
%vehicle.mountable = true;
$point = "0 8 3"; //8 meters in front, 3 meters up GENERICpoint
$trans = %client.player.getTransform(); //location of player
$point = MatrixMulPoint($trans, $point);//makes a new point by combning 2 points
%vehicle.setTransform($point);
Torque Owner Daniel M. Clark
First I made a Level01 script. Here's the code:
// Level 01 Script
function LoadLevel01( %client )
{
%BotCount = 4;
$BotName[0] = "Big Dan";
$BotName[1] = "Jason";
$BotName[2] = "Zecmo";
$BotName[3] = "Nooclles";
for(%i = 0; %i < %BotCount; %i++)
{
$Bot[%i] = AIPlayer::spawnPlayer( %client );
$Bot[%i].setShapeName($BotName[%i]);
// $Bot[%i].setAimObject($Bot[0]);
$Bot[%i].setMoveSpeed(10);
// $Bot[%i].setMoveDestination($Bot[0].getPosition());
// BOT_findPath(%this, %targetPosition);
}
}