Jump to content
Sign in to follow this  
tom.machu

Make BIS_fnc_randomPos running in MP

Recommended Posts

Hi,

having limited skills, I´m trying to make a script, which would result in a certain group of player spawned at a random position on the map and other group of player at other random position.

 

The script below works in SP, is there a way how to make the script operational in MP (listen server)?

_playerposition = [] call BIS_fnc_randomPos;
s1 setPos _playerposition;                     				 //s1 (placed object in Eden) is player1
s2 setPos (getPos s1);							 //s2 (placed object in Eden) is player2
_wreck = "Land_Mi8_wreck_F" createVehicle (s1 getPos [10, 45]);		

_smoke = "test_EmptyObjectForSmoke" createVehicle (getPos _wreck);
_smoke attachTo [_wreck, [0, -5, 0]];
_smoke2 = "test_EmptyObjectForSmoke" createVehicle (getPos _wreck);
_smoke2 attachTo [_wreck, [0, -3, 0]];
_emitter = "#particlesource" createVehicleLocal (getPos _wreck);
_emitter setParticleClass "MediumSmoke";
_emitter setParticleFire [0.3,1.0,0.1];

_fire = "test_EmptyObjectForFireBig" createVehicleLocal (getPos _wreck);
_fire attachTo [_wreck, [0, -5, 0]];

_onroadposition = [[[position s1,8000]],[], {isOnRoad _this}] call BIS_fnc_randomPos;
_offroad = "C_Offroad_01_comms_F" createVehicle (_onroadposition);
_offroad2 = "C_Offroad_01_comms_F" createVehicle (_offroad getPos [10, 180]);

c1 moveInDriver _offroad;						//c1 (placed object in Eden) is player3
c2 moveInCargo _offroad;
c3 moveInCargo _offroad;
c4 moveInCargo _offroad;

c5 moveInDriver _offroad2;						//c5 (placed object in Eden) is player4
c6 moveInCargo _offroad2;	
c7 moveInCargo _offroad2;
c8 moveInCargo _offroad2;

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×