Home   Help Search Login Register  

Author Topic: Shell Landing  (Read 364 times)

0 Members and 1 Guest are viewing this topic.

The_argyll

  • Guest
Shell Landing
« on: 14 May 2004, 06:18:13 »
How do I find out the last position a shell has landed for a each tube in a platoon of 4 mortars where TubeID is the number of the tube, 1 through 4. X is the X Coord. Y is the Y Coord. I dont need to know the Z Coord though.
Thanks,
RS
« Last Edit: 14 May 2004, 06:21:15 by The_argyll »

Unnamed

  • Guest
Re:Shell Landing
« Reply #1 on: 14 May 2004, 07:08:11 »
This added to the fired event will allow you to track the shells, just put the following line in each of your Mortars init fields:

Code: [Select]
this addeventhandler ["Fired","_this exec {Track.sqs}"]
Track.sqs

Code: [Select]
_sh=_this Select 0
_aT=_this Select 4
_ts=ObjNull
@(Call {_ts=NearestObject [_sh,_aT];!IsNull _ts})
~1
#Loop

_LastPos=GetPos _ts

~0.1

If !(IsNull _ts) Then {goto "Loop"}

_X= _LastPos Select 0
_Y= _LastPos Select 1
 

You can get away with this because the muzzle velocity its quite low for mortars. Although it might miss rounds when things get really busy on screen.

Probably worth checking out this thread as well:

http://www.ofpec.com/yabbse/index.php?board=8;action=display;threadid=16544;start=0

But you might want to check out CoC's UA:

http://www.main.thechainofcommand.net/

Or even my humble efforts:

http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=12343

http://www.ofpec.com/yabbse/index.php?board=43;action=display;threadid=17018