Jump to content
  • 0

call EPOCH_server_setVToken;


TolH

Question

Hello,

I have a question regarding "call EPOCH_server_setVToken;"

I made a town invasion mission and i am having trouble keeping the spawnned vehicle on the map. They immediatly despawn as soon as a player is near by.

IF i add "call EPOCH_server_setVToken;" to my AI patrol vehicle at mission, it just doesn't work. I commented both call in the exemple as it was not working and script was hanging there.

This is what i tried for reference (1 ground patrol and 1 air patrol). Any help or pointer would be appreciated, thank you ! It's spawned server side also from a .pbo

Spoiler

 


//============================================////============================================//
//ADDING GROUND PATROL
	//GROUP #6
	_spawnGroup6 = [_kRandSpawnPos5, 180, "O_G_Offroad_01_armed_F", resistance] call bis_fnc_spawnvehicle;
	//_spawnGroup6 call EPOCH_server_setVToken;
	nul_script6 = [(_spawnGroup6 select 2), (getMarkerPos "Missionmarker1"), 1000] call VEHICLE_PATROL;	//BIS_fnc_taskPatrol;
	TANK_AI_1 = _spawnGroup6 select 0;
		//CREATE VEHICLE MARKER IF OPTION SELECTED
		if (VEHICLE_MARKER isEqualTo 1) then
		{
			_VehicleMarker1 = createMarker ["Vehicle_1", getPos TANK_AI_1];
			"Vehicle_1" setMarkerColor "ColorRed";
			"Vehicle_1" setMarkerShape "ICON";
			"Vehicle_1" setMarkerType "o_mech_inf";
			"Vehicle_1" setMarkerText "";
			"Vehicle_1" setMarkerSize [0.6,0.6];
		};
//ADDING FLYING PATROL
	//GROUP #7
	_spawnGroup7 = [[getMarkerPos "Missionmarker1" select 0, getMarkerPos "Missionmarker1" select 1], 270, "O_Heli_Light_02_F", resistance] call Bis_fnc_spawnvehicle;
	//_spawnGroup7 call EPOCH_server_setVToken;
	nul_script7 = [(_spawnGroup7 select 2), (getMarkerPos "Missionmarker1"), 1000] call HELI_PATROL;	//BIS_fnc_taskPatrol;
	HELI_AI_1 = _spawnGroup7 select 0;
		//CREATE VEHICLE MARKER IF OPTION ENABLED
		if (VEHICLE_MARKER isEqualTo 1) then
		{
			_VehicleMarker2 = createMarker ["Heli_1", getPos HELI_AI_1];
			"Heli_1" setMarkerColor "ColorRed";
			"Heli_1" setMarkerShape "ICON";
			"Heli_1" setMarkerType "c_plane";
			"Heli_1" setMarkerText "";
			"Heli_1" setMarkerSize [0.6,0.6];
		};
//============================================////============================================//

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I take it the script run's client side, remoteexec the vehicle spawning by adding  the below in your missionfile \epoch_config\ConfigsCfgRemoteExec.hpp

within the  class Functions brackets.

		class EPOCH_server_setVToken
		{
			allowedTargets = 2;
			jip = 0;
		};

so you use

_spawnGroup6 call EPOCH_server_setVToken;

finish with

_spawnGroup6 remoteexec ['EPOCH_server_setVToken',2];

try this, let me know plz

//ADDING GROUND PATROL
	//GROUP #6
	_spawnGroup6 = [_kRandSpawnPos5, 180, "O_G_Offroad_01_armed_F", resistance] _spawnGroup6 call EPOCH_server_setVToken;
	nul_script6 = [(_spawnGroup6 select 2), (getMarkerPos "Missionmarker1"), 1000] call VEHICLE_PATROL;	//BIS_fnc_taskPatrol;
	TANK_AI_1 = _spawnGroup6 select 0;
	_spawnGroup6 remoteexec ['EPOCH_server_setVToken',2];
		//CREATE VEHICLE MARKER IF OPTION SELECTED
		if (VEHICLE_MARKER isEqualTo 1) then
		{
			_VehicleMarker1 = createMarker ["Vehicle_1", getPos TANK_AI_1];
			"Vehicle_1" setMarkerColor "ColorRed";
			"Vehicle_1" setMarkerShape "ICON";
			"Vehicle_1" setMarkerType "o_mech_inf";
			"Vehicle_1" setMarkerText "";
			"Vehicle_1" setMarkerSize [0.6,0.6];
		};
//ADDING FLYING PATROL
	//GROUP #7
	_spawnGroup7 = [[getMarkerPos "Missionmarker1" select 0, getMarkerPos "Missionmarker1" select 1], 270, "O_Heli_Light_02_F", resistance] _spawnGroup7 call EPOCH_server_setVToken;
	nul_script7 = [(_spawnGroup7 select 2), (getMarkerPos "Missionmarker1"), 1000] call HELI_PATROL;	//BIS_fnc_taskPatrol;
	HELI_AI_1 = _spawnGroup7 select 0;
	_spawnGroup7 remoteexec ['EPOCH_server_setVToken',2];
		//CREATE VEHICLE MARKER IF OPTION ENABLED
		if (VEHICLE_MARKER isEqualTo 1) then
		{
			_VehicleMarker2 = createMarker ["Heli_1", getPos HELI_AI_1];
			"Heli_1" setMarkerColor "ColorRed";
			"Heli_1" setMarkerShape "ICON";
			"Heli_1" setMarkerType "c_plane";
			"Heli_1" setMarkerText "";
			"Heli_1" setMarkerSize [0.6,0.6];
		};

 

cheers

natoed

Link to comment
Share on other sites

  • 0

The script is running server side from a .pbo

Still, tried what you posted and it wasn't working. At first it was erroring missing ;  Played around with it to make it work but then same problem as before. Ai not spawning at this point. But no error message.

rpt :

Spoiler

 1:04:52 "DEBUG: _event ChangeWeather"
 1:04:52 "Epoch: Weather Change - fog: [0.0118582,0.000478067,0.000665553] rain: 0.65834 overcast: 0.66129 wind: [110.978,13.5423] wind-xy: [-3.20619,8.3618] forced: false"
 1:05:26 "======================================================================="
 1:05:26 "-=T.I.M.S=-: config File Loaded!"
 1:05:26 "======================================================================="
 1:05:26 "-=T.I.M.S=-: Loot List Loaded!"
 1:05:26 "-=T.I.M.S=-: Functions File Loaded!"
 1:05:48 Loading movesType CfgMovesGoat_F
 1:05:48 Creating action map cache
 1:05:48 MovesType CfgMovesGoat_F load time 15 ms
 1:06:26 "======================================================================="
 1:06:26 "-=T.I.M.S=-: !!!MISSION SYSTEM ENABLED FROM CONFIG!!! STARTING MISSION..."
 1:06:26 "======================================================================="
 1:06:48 Loading movesType CfgMovesSheep_F
 1:06:48 Creating action map cache
 1:06:48 MovesType CfgMovesSheep_F load time 16 ms
 1:07:26 "======================================================================="
 1:07:26 "-=T.I.M.S=-: Mission -Invasion.sqf- Started"
 1:07:26 "======================================================================="
 1:07:50 "SKN AdminLog [""Map to Teleport"",2,B Alpha 1-1:1 (0908) REMOTE,""yjopoi""]"
 1:07:50 "SKN2 AdminRequest [[""01:07"",""0908"","" -ON-"",""Map to Teleport""]]"
 1:07:51 "SKN AdminLog [""God Mode"",2,B Alpha 1-1:1 (0908) REMOTE,""yjopoi""]"
 1:07:51 "SKN2 AdminRequest [[""01:07"",""0908"","" -ON-"",""Map to Teleport""],[""01:07"",""0908"","" -ON-"",""God Mode""]]"

 

But by looking at it, should i add the token call in a custom "call bis_fnc_spawnvehicle;" function ? Since thats the function i am using.

 

Link to comment
Share on other sites

  • 0

Soz I thought the script ran client side, cause my post above would have worked if it was client side.

could try He-Man's answer here

As its server side the below should work.

call EPOCH_server_setVToken;

Also I have noted in lotta scripts/mission systems the "BIG BOYS"  all use the below as well.

_veh call EPOCH_server_vehicleInit;

hope you sort it,  i'll shut up now.

cheers

natoed

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...