Jump to content
Sign in to follow this  
PicVert

Order the gunner of my tank to target

Recommended Posts

I have made a script to reveal and dowatch then dotarget next dofire did not work but fire yes ...

My problem is the turret take the dir of the target but the gunner did not take target until I use menu target then select it rock.gif

There is a way to tell to my gunner woot is the target without the menu like by script when I use action ??

Thx for re:

PicVert

Share this post


Link to post
Share on other sites

does the script contain Unitready _unit do the script wait for each command to complete.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _the select 0

_target = _this select 1

_unit reveal _target

_unit commandtarget _target

_unitready _unit

~1

_unit dofire _target

exit

Not tested this but i think it would work

Share this post


Link to post
Share on other sites

did not work sad_o.gif that what I do :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_target2 = "HeliH" createVehicle posX

_V reveal _target2

_V dowatch _target2

_V dotarget _target2

~5

_V fire "cannon"

All work but the cannon did not take the target it stay horizontaly and if I give the target by menu to the gunner, the cannon move up.

I wish to find a solution for the cannon move up but by script and not by give the order to target by target menu in game...

Please HELP lol  crazy_o.gif

Edit :

It seems that when dowatch the turret turn to target (good) then when dotarget the yellow square is there (good), but if I put commandtarget nothing append ... and fire is good too the tank fire but not use target it fire horizontaly sad_o.gif cause it not take the target proper insted I give the target Heli H by target's menu in OFP ... sad_o.gif

PicVert

Share this post


Link to post
Share on other sites

try commandfire cus the fire option seems to make the AI fire in the air :S

Share this post


Link to post
Share on other sites

It seems all commandXXX is completly ignored by the gunner I saw you put the target in _this select may be is the solution I would try it ..

But I dont think if I create object like :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_target2 = "HeliH" createVehicle posX

I can include it in _this select rock.gif

ghostface.gif

Share this post


Link to post
Share on other sites

wait a second...

you want to make a tank shoot a helo ?

keep in mind that tank guns in OFP have a limit height angle. If helo is too high tank can´t aim on it and wont fire main gun.

Share this post


Link to post
Share on other sites
did not work sad_o.gif that what I do :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_target2 = "HeliH" createVehicle posX

_V reveal _target2

_V dowatch _target2

_V dotarget _target2

~5

_V fire "cannon"

All work but the cannon did not take the target it stay horizontaly and if I give the target by menu to the gunner, the cannon move up.

I wish to find a solution for the cannon move up but by script and not by give the order to target by target menu in game...

Please HELP lol  crazy_o.gif

Edit :

It seems that when dowatch the turret turn to target (good) then when dotarget the yellow square is there (good), but if I put commandtarget nothing append ... and fire is good too the tank fire but not use target it fire horizontaly sad_o.gif cause it not take the target proper insted I give the target Heli H by target's menu in OFP ... sad_o.gif

PicVert

the fire command needs the exact weapon to fire you need to read up on weapons and ammo in the unofficial Tut for weap names.

T80 = "GUN125" smile_o.gif

Share this post


Link to post
Share on other sites
wait a second...

you want to make a tank shoot a helo ?

keep in mind that tank guns in OFP have a limit height angle. If helo is too high tank can´t aim on it and wont fire main gun.

hehe no I would give a far target to my gunner but it seems that's not possible rock.gif The turret turn to the target (yellow square as right using dowatch) but when I put dotarget nothing append sad_o.gif  then if I use commandtarget I can hurd the voice tellin :"2 target Tank" but the gunner did not or do not take the target with withe square rock.gif then the main gun stay honrizontaly ... the main gun must go up to fire in the right direction ..

Any suggestion to make the gunner target correctly my tank ?

Thx.

PicVert

-Edit :

@Junker I have put the right magazine type in code ;) all work fine exept the main gun do not take the target correctly then if I fire my tank fire a bullet like a .... in front of my tank lol I would the bullet goes more far as is possible ;)

Thx...

Share this post


Link to post
Share on other sites
"knowsabout" could be helpful also.

Yes I think there is the problem I have reached knowsabout to 1 is it enought ? after read some post I saw that the point of no return is 1.5 ?? sad_o.gif I'll check it ..

Thanks Balschoiw.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×