Sandbird
Valued Member!
I am making some objects in my dayz_server.pbo and set some global variables on them
Now in my client files i have an addaction that starts a script which has this at some point:
I am adding a diag_log at the end to see if t11 is set and it is....
But if i set a diag_log inside the object_hit.sqf then i get nothing.....as if the script is not running at all.
Is there anything wrong with this code ?
(_ran1 is just a random value, always set to 100 now for testing)
(t11,5 <--- 5 is just a number i am using in a for loop inside the object_hit).
ps: no errors both in server and client log files.
Why isnt the eventhandler registering the hit, when i am shooting at the object?
This works fine in SP, but not in MP.
Is it because the object is created on the server and the client for some reason doesnt 'see' it ?
Using epoch 1031.
Code:
_this = createVehicle ["Land_Campfire_burning", [7086.0464, 2746.9268, -6.6757202e-006], [], 0, "CAN_COLLIDE"];
_this setDir -130.23953;
t11 = _this;
_this setvehicleinit ' this setVehicleVarName "t11";';
Now in my client files i have an addaction that starts a script which has this at some point:
Code:
if(_ran1 > 50)then{t11 addEventHandler ["hit", {[t11,5] execVM "custom\object_hit.sqf"}];};
I am adding a diag_log at the end to see if t11 is set and it is....
But if i set a diag_log inside the object_hit.sqf then i get nothing.....as if the script is not running at all.
Is there anything wrong with this code ?
(_ran1 is just a random value, always set to 100 now for testing)
(t11,5 <--- 5 is just a number i am using in a for loop inside the object_hit).
ps: no errors both in server and client log files.
Why isnt the eventhandler registering the hit, when i am shooting at the object?
This works fine in SP, but not in MP.
Is it because the object is created on the server and the client for some reason doesnt 'see' it ?
Using epoch 1031.
Last edited: