Jump to content
Sign in to follow this  
CaponeSB

starting falling with parachute, no more satchels

Recommended Posts

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

Replace the backpack with the satchels once the player hits the ground.

Share this post


Link to post
Share on other sites

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

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
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

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

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
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

a8ehe.png

this is the init file

2w70brn.png

this is the script file

10dysd2.png

What's wrong?

Share this post


Link to post
Share on other sites

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

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
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
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

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

Try the first waitUntil condition like the following:

waitUntil {!isNull player && time > 3};

Share this post


Link to post
Share on other sites
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
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

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

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
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

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 by CaponeSB

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×