OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Piraneous on 31 Jan 2004, 03:00:44

Title: improved missile accuracy at extreme ranges
Post by: Piraneous on 31 Jan 2004, 03:00:44
i want an AI AT soldier to fire in a stationry tank at a range of at least 1 km and actually make it hit the target.

i'm using dotarget and dofire in order to make the soldier fire on the target, but he always misses.
Title: Re:improved missile accuracy at extreme ranges
Post by: macguba on 31 Jan 2004, 10:27:09
At that sort of distance you start to run into problems with munitions expiring - all bullets, missiles, etc. have a maximum life measured in seconds.     You might be better to fake it by "catching" the missile with eventhandler fired and nearestobject, deleting it, and camcreating an explosion on the target a few seconds later.

On the other hand, maybe it's near enough to work.   Make the AT loon maximum skill and give him this line of code before he fires.  Check the syntax.

ATloon reveal target1

Dunno if that will work or not.
Title: Re:improved missile accuracy at extreme ranges
Post by: Piraneous on 31 Jan 2004, 11:18:55
ok,  i was a little over zealous with my range indication, its actually only 500m.  i tried the line you sugested,  but it didn't really help,  even with the ATguy's skill on maximum.  i know the missile goes the distance cos i can hit the tank myself.

where can i learn more about these event handlers you speak of.

and is there any way of making the firer aim at a co-ordinate rather than a target,  cos if i could just get him to fire slightly higher,  it would hit.  as it is,  he's only missing my a meter or two
Title: Re:improved missile accuracy at extreme ranges
Post by: macguba on 31 Jan 2004, 11:31:13
There are some good bits and pieces in the editors depot about eventhandlers, just hunt around.

There is an invisible target addon somewhere.   You could setpos it directly above the tank.