H3NRY 10 Posted April 1, 2013 ok, so start of my mission the server picks a random spawn point and sets that to a global variable ( dont know if its needed) then in the units init field it setpos the units to the newly found spawn point ( i use a script to setpos the player, thats where i need help) the script does not move me, nor other clients but it displays the hint.. am i attempting to move the player too early or something? here is the script and player init fields respectively waitUntil {!isNull player};player setpos (getmarkerpos spawnlocations);hint "im here!"; this = this execvm "spawn.sqf"; yes i have seartched and nothing that anyone has done is working for me. at one point i just used triggers to telleport each player but it was not consistent, even with one trigger per person, per 1X1meter any help would be great. Share this post Link to post Share on other sites
-huviline- 10 Posted April 1, 2013 Hi. I'm not very proficient with arma scripting but I was just messing around something similar this weekend. I was not spawning players but spawning loot and enemy units and despawning them later. Ok I understand that you put the first code into init.sqf and the second one goes to the players init field. I might be wrong but I don't think you need to put anything to the players init field. You should be able to do it just with init.sqf or execute the spawn.sqf from the init.sqf. so the init.sqf would look something like this: waitUntil {!isNull player}; _null = [] execVM "spawn.sqf"; All the other script you put into the spawn.sqf. I don't know what you have there but in general something like this might work: get all the markerpositions to an array variable and assign one random position to a player and do this until all players have a starting position. Share this post Link to post Share on other sites
H3NRY 10 Posted April 1, 2013 i have been playing with it and have ended up with a trigger, it works for all players connected when the mission starts but join in progress is kinda... flawed. i have tried the way you suggest but it also just outright failed, no errors or anything. i want all players to spawn at the same location but that location to be random across the map. "spawnlocations" is an array that i BIS_fnc_selectRandom on server side and then spawn all units there... works thru a trigger but not thru init of players nor in the init.sqf... i am just t a loss for words on this one... im doing soemthing wrong.. but what and where is my issue... i need to spend time and look thru each character of my code.. Share this post Link to post Share on other sites
-huviline- 10 Posted April 2, 2013 http://forums.bistudio.com/showthread.php?151717-Help-needed-with-random-spawnpoints/page2 Doesn't it work the same way as here? Share this post Link to post Share on other sites