Page MenuHomeFeedback Tracker

Scripts executed via "Expression" field of Vehicle Respawn module sometimes fail to execute
New, NormalPublic

Description

I set up the following script for testing this named "handleVehicleRespawn.sqf"

params["_newVeh","_oldVeh"];

switch (typeOf _oldVeh) do
{
	case ("B_UGV_01_F"):
	{
		_newVeh setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"];
		hint "Working!";
	};
};

And put this in the ModuleVehicleRespawn_F synced with the UGV:

_this execVM "handleVehicleRespawn.sqf"

Most of the time the script executes and the UGV respawns blue. About 5% to 10% of the time the UGV respawns with it's normal texture.

When I try putting the "UGV setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"];" command into the expression field directly it seems to execute 100% of the time and turn the UGV blue. However changing "_newVeh" in the script directly to the name of the UGV doesn't seem to fix it.

Details

Severity
Major
Resolution
Open
Reproducibility
Sometimes
Operating System
Windows 7 x64
Operating System Version
Windows 7 Ultimate x64 SP1
Category
Scripting
Steps To Reproduce

Open this mission in hosted multiplayer:


Open zeus.
Mouse over the UGV's unit icon.
Press the "end" key (default keybind).
Repeat numerous times.
The UGV will sometimes not repspawn blue.

Open this mission in hosted multiplayer:


Repeat the steps for the previous mission.
The UGV should always respawn with a blue texture.