Cryptdik 5 Posted April 10, 2017 I've looked into this and have gotten them to work before, but I'm having issues here. I have the .sqf in the same folder as the mission.sqm file for that mission like I'm supposed to, but when I load the mission on MP it immediately says it can't find the .sqf. I'm calling it using someone else's script that is intended to attach a respawn marker to a vehicle, put in the vehicle's init line: nul = ["respawn_west", this] execVM "boatrespawn.sqf" As far as I can tell, everything should be in place, but it can't find the .sqf? Share this post Link to post Share on other sites
Tankbuster 1747 Posted April 10, 2017 Are you sure it's not actually boatrespawn.sqf.txt? This is a mistake we've all made. :) What did you use to create/edit the file? Share this post Link to post Share on other sites
Cryptdik 5 Posted April 10, 2017 I think that's the problem, it seems to be a .txt file. Do I need to use something besides notepad to save it to make it an actual .sqf? Share this post Link to post Share on other sites
Tankbuster 1747 Posted April 10, 2017 Part of the problem is the way windows explorer displays file extensions. Make sure that it's showing the full extension. Try notepad++ or similar. There are many text editors that will do, some of which are specially adapted for sqf. Have a look around here for Poseidon, its excellent. Share this post Link to post Share on other sites
tirpitz 15 Posted April 10, 2017 For any scripting work I would recommend unhiding file extensions anyway. Else you can use notepad but in the save dialogue select the option other than "plain text (txt) ".Sent from my D6503 using Tapatalk Share this post Link to post Share on other sites
Cryptdik 5 Posted April 10, 2017 Got it working, thanks a million! 1 Share this post Link to post Share on other sites
Cryptdik 5 Posted April 10, 2017 Another issue came up. When I start the mission, it takes you immediately to the spawn countdown. This makes it so the player unit doesn't spawn in the boat to start off. How can this be fixed? Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 10, 2017 37 minutes ago, Cryptdik said: Another issue came up. When I start the mission, it takes you immediately to the spawn countdown. This makes it so the player unit doesn't spawn in the boat to start off. How can this be fixed? We need to see the script to know whats wrong with it mate Share this post Link to post Share on other sites
Cryptdik 5 Posted April 10, 2017 Oh duh my bad. _marker = _this select 0; _vehicle = _this select 1; while {alive _vehicle} do { _marker setmarkerpos getpos _vehicle; sleep 3; }; deletemarker _marker; That's the script to attach the respawn marker to the vehicle. Then there's a trigger to put everybody in the boat. In act: sleep 0.1; play1 moveindriver insertboat1; play2 moveincargo insertboat1; play3 moveincargo insertboat1; play4 moveincargo insertboat1; So far all the AI get placed into the boat, but the player unit I start as will start on top of or in the water next to it. Then I have a trigger placed by an enemy base to move a second spawn point not attached to the boat (so you can spawn on the beach) to a forward waypoint using this in the trigger act: respawn_west2 setMarkerPos getpos respawnpoint2 However that doesn't seem to work either. Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 10, 2017 13 minutes ago, Cryptdik said: Oh duh my bad. _marker = _this select 0; _vehicle = _this select 1; while {alive _vehicle} do { _marker setmarkerpos getpos _vehicle; sleep 3; }; deletemarker _marker; That's the script to attach the respawn marker to the vehicle. Then there's a trigger to put everybody in the boat. In act: sleep 0.1; play1 moveindriver insertboat1; play2 moveincargo insertboat1; play3 moveincargo insertboat1; play4 moveincargo insertboat1; So far all the AI get placed into the boat, but the player unit I start as will start on top of or in the water next to it. Then I have a trigger placed by an enemy base to move a second spawn point not attached to the boat (so you can spawn on the beach) to a forward waypoint using this in the trigger act: respawn_west2 setMarkerPos getpos respawnpoint2 However that doesn't seem to work either. So basically you want the player to spawn in boat at the start?? Share this post Link to post Share on other sites
Cryptdik 5 Posted April 10, 2017 Right, since it begins the mission at the respawn menu, when I spawn at the boat waypoint I'm not in it. Edit: I need a way to make it so when you use that respawn point it puts you in the boat, but also not have that happen with the secondary respawn point. Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 10, 2017 12 minutes ago, Cryptdik said: Right, since it begins the mission at the respawn menu, when I spawn at the boat waypoint I'm not in it. Edit: I need a way to make it so when you use that respawn point it puts you in the boat, but also not have that happen with the secondary respawn point. Move the player into the boat in the file "initPlayerLocal.sqf" and add a Respawn eventHandler so when the player respawns he will spawn on the beach. Cheers 1 Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 10, 2017 Let me know if it worked :) Share this post Link to post Share on other sites
Cryptdik 5 Posted April 10, 2017 Sadly I'm really new to writing scripts outside of the Arma editor. I've noticed it has a very different format than when doing anything inside the editor and am not sure how to write this up in a init.PlayerLocal.sqf nor how to use eventHandlers xO Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 10, 2017 Just now, Cryptdik said: Sadly I'm really new to writing scripts outside of the Arma editor. I've noticed it has a very different format than when doing anything inside the editor and am not sure how to write this up in a init.PlayerLocal.sqf nor how to use eventHandlers xO Click here to learn more about eventHandlers. Reason I am not writting it down for you is because i am quite positive you wish to learn :) Trial and error brother, trial and error :D Also, the file "initPlayerLocal.sqf is a file you place within the mission folder along with the sqm file. It gets executed as soon as the player joins the server. the onPlayerRespawn.sqf gets executed as soon as a player respawns. There are other files to like init.sqf, initServer.sqf etc you can read about in the wiki Share this post Link to post Share on other sites
Cryptdik 5 Posted April 10, 2017 Right I know enough to recognize that the initPlayerLocal.sqf would be that, I just need to learn how to actually write SQFs myself. Any good resources for that? Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 10, 2017 2 minutes ago, Cryptdik said: Right I know enough to recognize that the initPlayerLocal.sqf would be that, I just need to learn how to actually write SQFs myself. Any good resources for that? Yeah there, check this document I made "https://docs.google.com/document/d/1ueYPCSdme9pvar38JvinvKs3qdQIWp7qPorLJ1wKt3Q/edit" to help people learn. Cheers :) Share this post Link to post Share on other sites
Cryptdik 5 Posted April 10, 2017 Favoriting!! Focker's Guide looks like exactly what I need. I'll try to get something going tomorrow and let you know. 1 Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 10, 2017 8 minutes ago, Cryptdik said: Favoriting!! Focker's Guide looks like exactly what I need. I'll try to get something going tomorrow and let you know. favorite the doc "Useful links" too, trust you will need later Share this post Link to post Share on other sites