OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Malm on 19 Apr 2005, 07:47:16
-
I got a problem in one of my MP missions where a group of vehicles behave differently when run on the server than on my local rig.
I got three move-waypoints (0-2) and a third Cycle wp(3). In the init field of wp(1) I got :
[group this, 2] setWPPos [(getmarkerpos "Target" select 0) + (random 540), (getmarkerpos "Target" select 1) + (random 540) ]; "TG28" SetMarkerPos getpos this
In the init field for wp(2) I got :
[group this, 1] setWPPos [(getmarkerpos "Target" select 0) + (random 540), (getmarkerpos "Target" select 1) + (random 540) ]; [group this, 3] SetWPPos (GetWPPos [group this, 1]); "TG28" SetMarkerPos getpos this
Target marker is set by a server script:
#MAPUPDATE
~10
"A10Marker" setmarkerpos getpos worthog
"Target" setmarkerpos (getpos player)
; I know that the player obj is different on each rig but if "Target" is just set to one of them it is good enough
goto "MAPUPDATE"
On my rig the group of vehicles are chasing me but on the server the stop dead at wp(1). Any suggestions?
thanks in advance
-Malm
-
Ok I thought I knew what was wrong and placed the SetWPPos in a script-file with ?!(local Server) in the top of the file but unfortunally the result was the same. The vehicles still stop at wp(1) and wont move to any given random wp's set by SetWpPos. I am beginning to think that SetWpPos is one of those commands that is not suitable for MP. The mission runs smoothly on my local computer.
Can anyone confirm or decline that statement?
best regards
-Malm
?!(Local Server) : exit
zGroup = _this select 0
zWp = _this select 1
zMarker = _this select 2
zDist = _this select 3
[zGroup, zWp] setWPPos [(getmarkerpos zMarker select 0) + (random zDist), (getmarkerpos zMarker select 1) + (random zDist) ];
exit