SD_BOB 10 Posted June 26, 2012 (edited) Hey guys, I know this is a long shot, but after multiple searches I have gotten nowhere. Basically I'm looking for a way that will allow any JIP players to have the option of "teleporting" if you will, to the location of the squad/squad leader of the group they are in. I've been running into some issues on a current project where after leaving the start area it is, pretty difficult to get JIP players into the fight. With a view to releasing this project, I am currently trying to "idiot proof" it as best as I can. As I say, after lots of searches the only thing which does what I need is included in the "Revive For ACE Wounds" by columdrum. This system works by giving JIP players 5 minutes to press a key, which then moves them to the location of the group. This is pretty much exactly what I want to achieve, but I'm afraid my scripting knowledge isn't at the level required to extract just this part, from the the ace revive system. Therefore I ask, if anyone knows of a way something similar could be achieved, that will work in a dedi environment? As I say, a long shot, but thankyou in advance for any help that can be provided. Edited June 27, 2012 by Shadow.D. ^BOB^ Share this post Link to post Share on other sites
mikie boy 18 Posted June 26, 2012 could try on playerconnect command - adding an addaction to allow the teleporting, and have a count down timer running aswell for the player. remove the addaction once teleported or timer runs out. and then reapply the addaction with eventhandler MPRespawn. just an idea. Share this post Link to post Share on other sites
moddero 1 Posted June 27, 2012 I dont know if this what you're locking foor its pretty simple but anyway... add the following line to the units init you want to have the action: returnloset= this addAction ["return", "youname.sqf"]; then name this script same you named it before youname.sqf _s = _this select 0; _caller = _this select 1; _id = _this select 2; ; _thebest=leader _s _lost = _s _lost setpos (getPos _thebest); Share this post Link to post Share on other sites
Muzzleflash 111 Posted June 27, 2012 Why not use an action on something in the base, for example a flag. JIP's will be able to use it to tp to their squad. If you allow respawns then the respawnees can also get back to their squad, not just jips. You could add an action to this script file (much similar to the one posted by moddero): _caller = _this select 1; _leader = leader group _caller; _caller setVehiclePos [getPos _leader, [], 10]; Share this post Link to post Share on other sites
SD_BOB 10 Posted June 27, 2012 Cheers for the replies guys, i'm playing around with various things but atm i appreciate any input at this point. Its not so much moving the player to the group position that the problem, its getting it to only work for JIP player and for a short amount of time at the start of a mission. I'm making a little progress, just trying to piece everything together from the wiki. EDIT: Hmmm Muzzleflash that might definatly be an option, cheers. I'll ave a play and discuss with my testers, see what works best. Share this post Link to post Share on other sites
Muzzleflash 111 Posted June 27, 2012 (edited) In that case. You add the action when the player joins. You can create a trigger with condition local player and execute script file 0 = [player] execVM "jipTeleport.sqf"; And jipTeleport.sqf could look like this: _unit = _this select 0; _actionId = _unit addAction ["Teleport to squad", "jipTeleportAction.sqf"]; //5 minutes from now tp can't be used. [_unit, _actionId] spawn { _timeout = time + 5*60 waitUntil {sleep 10; time > _timeout}; (_this select 0) removeAction (_this select 1); }; In jipTeleportAction you teleport the player and remove the action using the id (_this select 2). EDIT: updated code; mistook action ids' for event ids'. Apparently action ids' do not change. Edited June 27, 2012 by Muzzleflash Share this post Link to post Share on other sites
SD_BOB 10 Posted June 27, 2012 Tried to use the first method you posted Muzzleflash, but seem to be getting a error:- Error in expression <_leader = leader group _caller; _caller setVehiclePos [getPos _leader, [], 10];> Error position: <setVehiclePos [getPos _leader, [], 10];> Error Missing ; File C:\Users\SD^BOB^\Documents\ArmA 2\mpmissions\Template.CSJ_SEA\scripts\rejointeleport.sqf, line 3 Did what you suggested, created a flagpole at base with the script on an action. Any ideas? Share this post Link to post Share on other sites
Muzzleflash 111 Posted June 27, 2012 Tried to use the first method you posted Muzzleflash, but seem to be getting a error:- Error in expression <_leader = leader group _caller; _caller setVehiclePos [getPos _leader, [], 10];> Error position: <setVehiclePos [getPos _leader, [], 10];> Error Missing ; File C:\Users\SD^BOB^\Documents\ArmA 2\mpmissions\Template.CSJ_SEA\scripts\rejointeleport.sqf, line 3 Did what you suggested, created a flagpole at base with the script on an action. Any ideas? My bad. setVehiclePos should be setVehiclePosition. Share this post Link to post Share on other sites
SD_BOB 10 Posted June 27, 2012 Sorted, cheers for the help mate, much appreciated. Share this post Link to post Share on other sites