thdman1511 4 Posted April 25, 2013 Can someone tell me how to create mobile respawn points. I have searched high a low for tutorials on this, but nothings that is clear enough for me to use in my mission. What I want to do, is once a base is captured, I want to move the spawn point there, as well as create new spawn points when other bases are captured. Can someone direct me to a tutorial and advise me how I can do this please. Share this post Link to post Share on other sites
loyalguard 15 Posted April 25, 2013 The easiest method is to set the respawn to type "BASE" and then in a condition in a trigger or a script to move the "respawn_west" marker via setMarkerPos to where you want the new respawn to be. Share this post Link to post Share on other sites
thdman1511 4 Posted April 25, 2013 Thankyou for your reply, how would I use it, and the wiki description has confused me a little. Wiki says syntax is "Marker" setMarkerPos pos (pos being (x,y) but the example uses "MarkerOne" setMarkerPos, getMarkerPos "MarkerTwo" How do we get the x,y coordinates to use in the setMarkerPos. Share this post Link to post Share on other sites
loyalguard 15 Posted April 25, 2013 The command getMarkerPos gets the coordinates for you automatically. So, if you want to move respawn_west to a different marker's location (well call it nextMarker just for this example) you would do this: "respawn_west" setMarkerPos (getMarkerPos "nextMarker"); Share this post Link to post Share on other sites
Valery 1 Posted April 25, 2013 A Loyalguard wrote..... So the best way is: put a car on the map and write the code from Loyalguard into the init line of the car. But do not forget to give the car a name (here in this case: respawn_west). The respawn point will goes now with the car. Is a real mobile respawn point now. Share this post Link to post Share on other sites
thdman1511 4 Posted April 26, 2013 Hi, again thankyou to both loyalguard and valery for the there help. How would I use the above coding in a situation where you have more than one spawn point. Some of my clan members were interested in having a moveable spawn points one capturing a base, as well as a mobile respawn point. or would it better to just go with the mobile respawn point. Share this post Link to post Share on other sites
loyalguard 15 Posted April 26, 2013 It is possible to have a base and a mobile respawn point, you just need some sort of mechanism (automatic or manual) to determine where the player will spawn. Now, I lied a little, you can only have on respawn type. For "BASE" respawn, the player will always respawn at the respawn_west (or east) marker(s). So the way this will work is that after respawn you will teleport the player with setPos. If, you want this to happen automatically, you would set a condition that as soon as the player is alive again you teleport him or her. If you want it to be a manual decision by the player, you could use an addAction to give the player the option to choose to teleport to the mobile respawn point from the base respawn point. Here is some code: init.sqf // Execute a script to add a killed event handler to the player. _nul = [] execVM "killedEH.sqf"; killedEH.sqf // Make sure the player is alive. waitUntil {alive player}; // Add a killed event handler that will execute a specific script whenever the player is killed. _killedEH = player addEventHandler ["killed", {_nul = [] execVM "chooseRespawn.sqf"}]; chooseRespawn.sqf // Make sure the player is alive. waitUntil {alive player}; // Add code here to setPos the player, give him an addAction to choose to teleport to another position, etc. Share this post Link to post Share on other sites
thdman1511 4 Posted April 26, 2013 Loyalguard the coding that was given about using the setMarkerPos, work ok, It allowed me to move the respawn_west marker to a new location. Once I capture the location, and was killed I would respawn at the captured base. I presumed that it would be a little more difficult with Mobile Spawn points. I still have lot to learn in regards to scripting, so I guess I will try things out and if they work then I will be happy but if they dont work then I will just have to keep researching. Just a query did Bohemia ever put out a guide to editing and scripting for any of the arma series at all. And if so where would I look to find them, other than wiki. Share this post Link to post Share on other sites
Gunter Severloh 4056 Posted April 26, 2013 Mobile respawn Script What this does: This will allow you to respawn at a vehicle you define by the script, so in the example and scripts below the name which is what is defined is named car ======================================= 1. Name a vehicle car this will be your respawn vehicle 2. create an init script and put in it: init.sqf execVM "respawnmkr.sqf"; 3. create another script name it: respawnmkr.sqf while {true} do { //moves markers defines in editor to the position of vehicle every 10seconds "Respawn_West" setmarkerpos getpos car; sleep 10; }; 4. create another script description.ext respawn = base; respawndelay = 3; 5. create a marker name it respawn_west for blufor, the code is set for blufor if you want opfor which would be respawn_east then you need to define it that in the code and create a marker in your mission accordingly. ============================ Share this post Link to post Share on other sites
thdman1511 4 Posted April 26, 2013 Thankyou Gunter, so that all the coding I need, much appreciated. Share this post Link to post Share on other sites