CaponeSB 10 Posted April 22, 2015 My mission starts with the squad falling with a parachute. I added some satchels to the explosive specialist, but everything disappears (I guess the parachute replaces the backpack). How can I handle this? I need those satchels for the mission. Share this post Link to post Share on other sites
jshock 513 Posted April 22, 2015 Replace the backpack with the satchels once the player hits the ground. Share this post Link to post Share on other sites
CaponeSB 10 Posted April 22, 2015 how am I supposed to do that? Share this post Link to post Share on other sites
EagleByte 40 Posted April 22, 2015 wait until the player is touching the ground: waitUntil {isTouchingGround player}; Then run a script or function: sleep 2; player addBackpack "TK_RPG_Backpack_EP1"; clearBackpackCargo unitBackpack player; //Dont entirely know if you need this, but fine to do anyway player addItemToBackpack "SatchelCharge_Remote_Mag"; This method is easiest to explain to someone... Share this post Link to post Share on other sites
jshock 513 Posted April 22, 2015 isTouchingGround is a bit unpredictable sometimes (especially when it's the only condition), the following is more reliable: waitUntil {(getPosATL player select 2) < 2}; Share this post Link to post Share on other sites
EagleByte 40 Posted April 22, 2015 isTouchingGround is a bit unpredictable sometimes (especially when it's the only condition), the following is more reliable: waitUntil {(getPosATL player select 2) < 2}; Thanks for the clarification. This should work better. Share this post Link to post Share on other sites
CaponeSB 10 Posted April 22, 2015 I'll try, thx guys. ---------- Post added at 23:12 ---------- Previous post was at 23:05 ---------- sorry for double-posting, but how am I supposed to run a script / function? Can you explain me in details? I'm not a real expert about this part. Share this post Link to post Share on other sites
epicgoldenwarrior 11 Posted April 22, 2015 In init.sqf or trigger act Null = []execVM "script.sqf"; Share this post Link to post Share on other sites
killzone_kid 1332 Posted April 23, 2015 you can add backpack right after you opened parachute it wont be visible but it will be there. Share this post Link to post Share on other sites
CaponeSB 10 Posted April 23, 2015 wait until the player is touching the ground: waitUntil {isTouchingGround player}; Then run a script or function: sleep 2; player addBackpack "TK_RPG_Backpack_EP1"; clearBackpackCargo unitBackpack player; //Dont entirely know if you need this, but fine to do anyway player addItemToBackpack "SatchelCharge_Remote_Mag"; This method is easiest to explain to someone... what I did is this but it doesn't work: This is the mission folder this is the init file this is the script file What's wrong? Share this post Link to post Share on other sites
EagleByte 40 Posted April 23, 2015 I would have done it like this: init.sqf: [] execVM "script.sqf"; script.sqf: waitUntil {alive player}; waitUntil {(getPosATL player select 2) < 2}; player addBackpack "B_Carryall_ocamo"; clearBackpackCargo unitBackpack player; player addItemToBackpack "SatchelCharge_Remote_Mag"; EDIT: I believe the classname you used for the backpack isn't valid. It was copied from the wiki for accuracy. Share this post Link to post Share on other sites
CaponeSB 10 Posted April 23, 2015 I don't really understand what's wrong. instead of "player" I put "specialist" (which is my unit's name), but it still doesn't work.. when I get on the ground and the parachute disappears, I still have no backpack, plus no satchels. Share this post Link to post Share on other sites
EagleByte 40 Posted April 23, 2015 I don't really understand what's wrong. instead of "player" I put "specialist" (which is my unit's name), but it still doesn't work.. when I get on the ground and the parachute disappears, I still have no backpack, plus no satchels. Did you put "B_Carryall_ocamo" as the classname of the backpack to add like mentioned in the post above? Share this post Link to post Share on other sites
CaponeSB 10 Posted April 23, 2015 Did you put "B_Carryall_ocamo" as the classname of the backpack to add like mentioned in the post above? I copy and pasted everything in the sqf file. Share this post Link to post Share on other sites
EagleByte 40 Posted April 23, 2015 Do this: waitUntil {alive player}; systemChat "Player is alive"; waitUntil {(getPosATL player select 2) < 2}; systemChat "Player is on the Ground"; player addBackpack "B_Carryall_ocamo"; systemChat "Added Backpack"; clearBackpackCargo unitBackpack player; systemChat "Cleared Cargo in Backpack"; player addItemToBackpack "SatchelCharge_Remote_Mag"; systemChat "Added Satchel to backpack"; Then see what it says, make sure it is detecting you are on the ground... Share this post Link to post Share on other sites
jshock 513 Posted April 23, 2015 Try the first waitUntil condition like the following: waitUntil {!isNull player && time > 3}; Share this post Link to post Share on other sites
CaponeSB 10 Posted April 23, 2015 Do this: waitUntil {alive player}; systemChat "Player is alive"; waitUntil {(getPosATL player select 2) < 2}; systemChat "Player is on the Ground"; player addBackpack "B_Carryall_ocamo"; systemChat "Added Backpack"; clearBackpackCargo unitBackpack player; systemChat "Cleared Cargo in Backpack"; player addItemToBackpack "SatchelCharge_Remote_Mag"; systemChat "Added Satchel to backpack"; Then see what it says, make sure it is detecting you are on the ground... It tells me nothing while testing the mission.. the backpack doesn't appear when I'm on ground. Share this post Link to post Share on other sites
EagleByte 40 Posted April 23, 2015 It tells me nothing while testing the mission.. the backpack doesn't appear when I'm on ground. Do you have a skype? Could help you easier from there. If not, send me your mission.sqm. Email: garrett@bulltechservices.com Share this post Link to post Share on other sites
R3vo 2654 Posted April 23, 2015 In the script.sqf you have to change the line clearBackpackCargo unitBackpack player to removeBackpack player Share this post Link to post Share on other sites
Torhec 16 Posted April 23, 2015 What's wrong? Hi! The problem isn't from your script, if it doesn't work it's simply because you don't have .sqf files. You see init.sqf & script.sqf but in the "type" column there is "Text Document". So you really have init.sqf.txt & script.sqf.txt, that's why your script doesn't work. :eek: So to solve your problem, just do a right click on your files, then go to Properties and there on the top of the first tab change init.sqf.txt by init.sqf, and do it also for the script. Then in the type column you will see "SQF File" (or something like this). I hope it helps you! :) Share this post Link to post Share on other sites
jshock 513 Posted April 23, 2015 Hi! The problem isn't from your script, if it doesn't work it's simply because you don't have .sqf files. You see init.sqf & script.sqf but in the "type" column there is "Text Document".So you really have init.sqf.txt & script.sqf.txt, that's why your script doesn't work. :eek: So to solve your problem, just do a right click on your files, then go to Properties and there on the top of the first tab change init.sqf.txt by init.sqf, and do it also for the script. Then in the type column you will see "SQF File" (or something like this). I hope it helps you! :) Fine catch and good first post :D. Share this post Link to post Share on other sites
CaponeSB 10 Posted April 23, 2015 (edited) well I don't know where I was LOL I'll try... such a stupid mistake.. I hope it will work later.. damn it... sometimes I get crazy with this editor.. EDITED The files are .sqf now, I changed what I had to change, according to what you ppl typed in your own posts, but still not backpacks.. I'm gonna think about changing mission type lol Edited April 23, 2015 by CaponeSB Share this post Link to post Share on other sites
EagleByte 40 Posted April 23, 2015 This is a very simple script to do, so it is not impossible by any means Share this post Link to post Share on other sites
epicgoldenwarrior 11 Posted April 23, 2015 just put an ammo crate somewhere with the charges and a marker if you dont wanna go this route. :S Share this post Link to post Share on other sites
CaponeSB 10 Posted April 24, 2015 Ok guys, sorry, I could be dumb or I don-t know.. May I ask you to type in oonly one post what I need to do in details? I've been trying everything again from the beginning, and I get confused with those corrections etc. Sorry. Share this post Link to post Share on other sites