Something like this maybe?
$my_ai.origin glue $tank.origin offset (0 0 0)
I know I will have to play with the numbers (x y z)
I looked through some scripts but got lost as usual.
Thanks for your help!
Moderator: Moderators
Code: Select all
glueguytotank local.tank local.offset:
local.org1 = spawn script_origin
local.org1 thread glueto local.tank
local.org2 = spawn script_origin
local.org2 = local.tank.origin + local.offset
local.org2 bind local.org1
self thread glueto local.org2
end
glueto local.other:
while(self && local.other)
{
self.origin = local.other.origin
self.angles = local.other.angles
waitframe
}
end
Code: Select all
AttachToTruck local.Player:
//This model is glued to truck origin
local.PointGluedToTruck = spawn script_model
local.PointGluedToTruck glue $truck1
// This model is where you want the players origin to be.
local.playerPos = spawn script_model
local.playerPos.origin = local.PointGluedToTruck.origin + (0 0 55)
// Bind these two points together so one follows the other around
local.playerPos bind local.PointToAttachPlayerTo
local.Player.origin = local.playerPos.origin
if (level.TruckMoving == 1)
{
local.Player glue local.playerPos
while (level.TruckMoving == 1)
{
wait 1
}
local.Player unglue
}
end
Code: Select all
glueguytotank local.tank local.offset:
local.tank = $Sherman
local.org1 = spawn script_origin
local.org1 thread glueto local.tank
local.offset = ( -8 -14.5 112)
local.org2 = spawn script_origin
local.org2 = local.tank.origin + local.offset
local.org2 bind local.org1
self thread glueto local.org2
end
glueto local.other:
while(self && local.other)
{
self.origin = local.other.origin
self.angles = local.other.angles
waitframe
}
endCode: Select all
$tankcdr.origin glue ($Sherman.origin + ( -8 -14.5 112))Code: Select all
$tankcdr.origin = ($Sherman.origin + ( -8 -14.5 112))Code: Select all
$tankcdr.origin = $Sherman.origin + ( -8 -14.5 80)
$tankcdr bind $ShermanCode: Select all
$nazi_tank waittill death
$tankcdr unbind
$tankcdr physics_on
$tankcdr anim tank_exit_1
$tankcdr waittill animdone
$tankcdr runto $wp1