Jump to content
Sign in to follow this  
Sari

"fired" eventhandler only has a 7km range for other clients?

Recommended Posts

I'm back with more queries regarding the 'fired' eventhandler and the tracking of artillery shells.

I seem to have discovered that the eventhandler will quite happily trigger locally regardless of how far away from the firing vehicle you are, but for another client, if they are more than 7km away from the firing vehicle then the eventhandler will not trigger. I've done a few searches on the forums/google/bis wiki but I haven't found any info on this so I'm wondering if anyone knows much about it and if there is a workaround (ie so all clients will trigger the eventhandler and therefore track the arty shells regardless of relative position on the map)

I've attached a link to a simple(ish) repro mission which will probably explain my problem 100x better than my rambling :o

http://www.sendspace.com/file/rpxhui

Repro steps:

- Run mission on dedicated server.

- Join as opfor.

- Verify the tracking script works by firing the D30 and checking the map.

- Get out and tell the Ai to get in as gunner.

- Hop in the F35 near to you.

- Fly all over the map whilst telling the AI to fire at random positions.

You should see that every shell is tracked regardless of where you are in relation to the D30.

Now restart the mission. For this part you will need two clients/separate running instances of Arma:

- Join as both Blufor and Opfor (which shall now be referred to as client #1 and client #2).

- Get into the D30 as client #2 and fire a round into the air.

- Open map on both clients and observe the tracked shell on both clients (which is the effect I am trying to achieve).

- Hop in the F35 at the end of the runway as client #1.

- Place a waypoint on the D30 as client #1.

- Fly around as client #1 whilst firing the D30 as client #2.

- Observe that any shells fired when client #1 is more than 7km from the D30 will not be tracked on client #1's map, but will be tracked on client #2's map.

Edited by Sari

Share this post


Link to post
Share on other sites

Does no one have any info on this? Its a bit of a dealbreaker for me :(

Share this post


Link to post
Share on other sites

have you tried using addMPEventHandler instead?

Share this post


Link to post
Share on other sites

Using addMPEventhandler as a direct substitution for addeventhandler doesn't work at all. My understanding of MPeventhandlers were that they were for specific commands like MPHit, MPKilled and MPRespawn. This however is an educated guess so I'm happy to be proven wrong!

edit:

From resources.bisimulations.com VBS2 wiki:

addMPEventHandler

Introduced in vbs2 version 2.00

Description: Executes the defined action on all attached MP clients.

This command can only be used with the special MP events.

Edited by Sari

Share this post


Link to post
Share on other sites

i am thinking of making arty radar script too and the fact is that arty computer already shows tracking of shells. so you might want to extract the arty comp pbo and look at the code how it is done...

like the script in "AddOns\modules\ca\modules\ARTY\data\scripts\ARTY_ShellFlight.sqf" which does the same as your script. it's called called via Fired event handler for the Vehicle . it uses publicvariable to start the tracking on clients.

i would probably try using that script, after all it's official arty comp code or learn from it.

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  

×