Jump to content
Sign in to follow this  
1para{god-father}

Random Start Position of Player

Recommended Posts

I am trying to create a Random start location , which all works until i try on a dedi server ?

It moves All my base to the random location but the Player starts where I placed him in the Editor? ( it all works fine when i test )

if (isserver) then {
	  _pads = [hpad1,hpad2,hpad3,hpad4,hpad5,hpad6,hpad7,hpad8,hpad9,hpad10,hpad11,hpad12,hpad13,hpad14,hpad15,hpad16,hpad17,hpad18,hpad19,hpad20];
	  _dest = _pads select (floor (random count _pads));
	  [siteObjects,_dest,35] execvm "shk_moveobjects.sqf";


             ["Base",getpos _dest, "Icon", [1,1], "TYPE:", "Start", "COLOR:", "ColorGreen", "GLOBAL", "PERSIST"] call CBA_fnc_createMarker;


};
server execVM "revive_init.sqf";

Share this post


Link to post
Share on other sites

Locality issue - the player is on the client - all the other stuff is running on the server

setPos is global - untested but this should work in there?

{_x setPos (getMarkerPos "Base")} forEach playableUnits;

(getMarkerPos is local but may work with the CBA function? if not setMarkerPos the marker at it's current location 1st?)

some other stuff that may help here:

http://forums.bistudio.com/showthread.php?142438-Dedicated-Server-set-players-to-a-random-position-during-briefing&highlight=random+start+player

Share this post


Link to post
Share on other sites

Still having an issue with this !

All works until i try on dedi then My played does not move or is Unconscious - presume it is due to the Marker not being there as @ the start ?

Anyone have any Suggestions on how i can have a Random Start Position for Players ?

----------------------------

Ignore all Resolved -- forgot to put down Respawn_west marker

Edited by psvialli

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  

×