Home   Help Search Login Register  

Author Topic: Laser Designator on dedicated server  (Read 938 times)

0 Members and 1 Guest are viewing this topic.

Larsen

  • Guest
Laser Designator on dedicated server
« on: 14 Nov 2004, 13:57:49 »
Hello.

I'm trying to use helicopters Laser Designator to place objects in the area where player ist targeting with the weapon (where the red dot is placed).

I know that when LD is used object "lasertarget" is created and placed at the reddot location.

I use a script from Snypirs SP/MP Support pack to trace the "dot" and than i create an object in the same place.

Script ld_monitor.sqs (it runs from start of the game) is used along with a trigger named 'detectlaser' big as whole map, activated reapeadly by anybody.

ld_monitor.sqs
 
#loop
   _targ = nothing
   _list = list detectlaser

   ? "LaserTarget" countType _list > 0 : "if ( ""LaserTarget"" countType [_x] > 0 ) then { _targ = _x; goto ""break"" }" foreach _list
#break

   ? (_targ != nothing) : sny_arty_var_laser_pos = [getPos _targ select 0,getPos _targ select 1,getPos _targ select 2]
   ? (_targ == nothing) : sny_arty_var_laser_pos = [0,0,0]
~0.4
hint format ["Value: %1",sny_arty_var_laser_pos]
goto "loop"



The problem is - its only works on non-dedicated server (and only if the player is the server).

If the vehicle is always local to the player, maybe also the helicopters Laser Designator target dot is local to player?

Maybe the trigger doesn't work as should?

Can anyone help? Or maybe there's another method to do the whole thing?


To place my objects i use different script - i use setpos with the value of  sny_arty_var_laser_pos

I added hint to the script to check the changes in value of sny_arty_var_laser_pos.
« Last Edit: 14 Nov 2004, 14:10:32 by Larsen »