Hello all again,
I have a serious question that I have touched on several times in other posts.
The problem is that I have NEVER got an answer, from anyone knowledgable.
When it comes to multiplayer scripting and even just editing (i.e editor waypoints) I have found that certain things simply work differently on a hosted server compared to a dedicated server EVEN WHEN THEY SHOULD NOT.
My question is if there is an explanation for this, or if this is an issue that non of you scripting masters know, simply because it is hidden in the game engine and might even be concidered a BUG.
To best illustrate my question I have this helicopter script as an example:
Insertion.sqs
_helo = _this select 0;
_targetpos = _this select 1
_homepos = _this select 2
_group = group _helo
_wp = _group addWaypoint [_targetpos, 0];
[_group, 1] setWaypointStatements ["true", "(vehicle this) flyinHeight 0;(vehicle this) land ""LAND"""];
[_group, 1] setWaypointTimeout [0, 0, 0];
[_group, 1] showWaypoint "NEVER";
[_group, 1] setWaypointSpeed "NORMAL";
[_group, 1] setWaypointType "MOVE";
_wp = _group addWaypoint [_targetpos, 0];
[_group, 2] setWaypointStatements ["count crew (vehicle this) == 1", "driver (vehicle this) say ""hell""; (vehicle this) flyinHeight 100"];
[_group, 2] setWaypointTimeout [0, 0, 0];
[_group, 2] showWaypoint "NEVER";
[_group, 2] setWaypointSpeed "NORMAL";
[_group, 2] setWaypointType "MOVE";
_wp = _group addWaypoint [_homepos, 0];
[_group, 3] setWaypointStatements ["true", "deleteVehicle driver (vehicle this); deleteVehicle (vehicle this)"];
[_group, 3] setWaypointTimeout [0, 0, 0];
[_group, 3] showWaypoint "NEVER";
[_group, 3] setWaypointSpeed "FULL";
[_group, 3] setWaypointType "MOVE";
exit
The script is run on ALL computers AND the "_helo" is not local to any player, since it is a PURE AI group that the players group get a ride from. When the ride is over, the waypoint checks for CREW == 1 and should then leave.
This script works as intended on a dedi, but when on a hosted server the chopper won't move to "_homepos" as indicated in the last waypoint, it just stays on the ground at "_targetpos". This happens at least when the leader of players group is NOT server.
Locality (which is a common MP issue) shouldn't be the problem, since it works on a dedi.
Does anyone on OFPEC have an idea of what's causing this problem, or is it an issue that only BIS could answer?
Sincerely
Laggy