misinformed 0 Posted April 27, 2007 Ok ive got a mobile respawn working however JIP players obviously still spawn for the first time back where the character/unit/soldier they selected was placed in the editor (because its a respawn and they havnt died yet). So i would ideally like to get everyone at the mobile respawn as soon as they connect, so i dont have to provide messy additional transport (for those who join mid mission) at the mission start location. At the moment im using a trigger to relocate the newly joined player unit to the mobile respawn if it has a driver, but its messy since i have to create a new trigger for each unit i want relocated upon spawning at the mission start area. Trigger radius around the starting mission area. man1 in thislist and !isNull driver Truck man1 setpos [ getPos Truck select 0, getPos Truck select 1] Also its moving players a little too close to the truck(mobile respawn). Almost in it, so is there a way i can use getpos and then move the player a few meters away from the truck . Share this post Link to post Share on other sites
shiner 0 Posted April 28, 2007 man1 setpos [ getPos Truck select 0, getPos Truck select 1] <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">man1 setpos [ getPos Truck select 0 + 5, getPos Truck select 1 + 5] Try that change the 5 to whatever distance you need. Share this post Link to post Share on other sites
misinformed 0 Posted April 28, 2007 Thx for the reply, but it doesnt work. Share this post Link to post Share on other sites
misinformed 0 Posted April 28, 2007 [(getpos truck select 0) + 5, (getpos truck select 1) + 5] Got it to work, thanks. Any thoughts on the multiple triggers thing? Is there a better way? Anyone? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted April 29, 2007 [(getpos truck select 0) + 5, (getpos truck select 1) + 5]Got it to work, thanks. Any thoughts on the multiple triggers thing? Is there a better way? Anyone? That's not with reference to the vehicle's heading though, if you want them directly behind the vehicle use this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit setpos [(getpos truck select 0)-(5*sin(getdir truck)),(getpos truck select 1)-(5*cos(getdir truck)),0] As for the JIP players, just setpos them as well when they enter the role. Share this post Link to post Share on other sites
misinformed 0 Posted April 29, 2007 Not quite sure how to setpos a player without a trigger when he joins the game in progress to allow for the truck being manned or the truck not being manned and doing this for 35 individual possible players characters without creating a specific trigger for each of them and checking if they are within a small starting area (so theyre likely to have just joined, or they havnt moved since the start of the mission ) Also without one guy joining the game in progress and being whisked away to the mobile respawn perfectly normally (when it has a driver) except he takes everyone else with him as well. Would something like onclientconnected coupled with a check of whether the truck is manned do the trick? But then ive still got 35 individual triggers for each possible playable character being fired just without the trigger radius. Share this post Link to post Share on other sites
Big Dawg KS 6 Posted April 29, 2007 Not quite sure how to setpos a player without a trigger when he joins the game in progress to allow for the truck being manned or the truck not being manned and doing this for 35 individual possible players characters without creating a specific trigger for each of them and checking if they are within a small starting area (so theyre likely to have just joined, or they havnt moved since the start of the mission )Also without one guy joining the game in progress and being whisked away to the mobile respawn perfectly normally (when it has a driver) except he takes everyone else with him as well. Â Would something like onclientconnected coupled with a check of whether the truck is manned do the trick? But then ive still got 35 individual triggers for each possible playable character being fired just without the trigger radius. It's no simpler than this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">@isPlayer man1 man1 setPos [(getpos truck select 0)-(5*sin(getdir truck)),(getpos truck select 1)-(5*cos(getdir truck)),0] Share this post Link to post Share on other sites
misinformed 0 Posted April 29, 2007 ohh because the init field is only fired when a player enters the map in the selected unit. Share this post Link to post Share on other sites