OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SneakyPete on 12 Apr 2005, 15:22:32

Title: Getting a tank to turn it s turret instead of chassis
Post by: SneakyPete on 12 Apr 2005, 15:22:32
Is it possible to get a tank to stay still and target an object by rotating the turret only and not the whole body?
Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: supershooter on 12 Apr 2005, 16:48:43
errr yes? don't you just seat yourself as the gunner?
Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: SneakyPete on 12 Apr 2005, 16:54:16
 ;D Very funny.

This is an AI controlled tank that I want to use in a cutscene.
Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: dmakatra on 12 Apr 2005, 17:27:39
Try

tank1 setfuel 0

:beat: *Gets Shot* :beat:
Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: bedges on 12 Apr 2005, 18:30:21
or even

Code: [Select]
deletevehicle tank_nameD
or

Code: [Select]
tank_nameD setpos someplace_else
which will get rid of the (D)river, leaving only the gunner to rotate his turret with a dowatch or dotarget command.

just a thought, no idea if it'll work or not. helpful eh? :P

Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: RujiK on 12 Apr 2005, 18:32:27
I suppose you could just make a tank with out a driver and then use setvelocity to make it look like its driving, and have the gunner target something, however it would proboby be easier to just driverdude disableai "Autotarget".
Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: Tyger on 12 Apr 2005, 21:26:51
wouldn't doTarget just do it without removeing the driver?
Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: SneakyPete on 12 Apr 2005, 22:31:39
And the winner is.....

No fuel works.

DoTarget does not.

Remove driver works.

Haven't tried the deletevehicle tank_nameD thing yet as I have no idea what that means.

With the tank on the move it rotates the turret fine.  Its just when its stationary that causes the problem.

It always amazes me that whatever you ask someone always has an answer.

Thanks guys.
Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: macguba on 12 Apr 2005, 22:46:01
Quote
It always amazes me that whatever you ask someone always has an answer.
It is true - it is very unusual for a question on this board not to be answered.
Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: bedges on 13 Apr 2005, 08:51:42
tank_nameD would indicate the driver of the unit called tank_name. similarly, tank_nameG will indicate the gunner, and tank_nameC the commander. handy for those loons already in vehicles that you want to grab for some reason :)
Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: SneakyPete on 13 Apr 2005, 12:37:35
Cheers Bedges,

Now I understand.  :thumbsup:
Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: Flauta on 13 Apr 2005, 18:08:02
Bedges:

those commends works???? like Tank1D??? I mean, thy are similar to
Code: [Select]
driver tank1 Right??? or you just name them...??
Title: Re:Getting a tank to turn it s turret instead of chassis
Post by: bedges on 13 Apr 2005, 18:34:23
both. tank1D is the same as driver tank1, just needs less typing ;)