Jump to content

Sign in to follow this  
tazmania720

auto open parachute in INIT

Recommended Posts

I have been looking for his answer for a while and can't find anything in a stand alone INIT script. I figured out how to get this far:

this addBackpack "B_Parachute"; this setPos [getPos this select 0,getPos this select 1,1900.00]; this action ["openParachute"];

But what I need now is to have the chute auto-open at 200m.

Also, if there is a basic script to add to a units INIT to place a backpack on the chest that would be great to know as well.

Thanks!

Share this post


Link to post
Share on other sites

This does everything you need except auto open at 200, shouldn't be too hard to implement though:

ATM Airdrop Script:

http://www.armaholic.com/page.php?id=21307

Excuse me, it should auto open your chute at 150m. You can alter this at line 90 of the atm_airdrop.sqf file in the ATM_airdrop folder.

Edited by JShock

Share this post


Link to post
Share on other sites

Gents! Appreciate the feedback. @JShock, will this work wit AI squad members? I am fiddling with it and am not sure how to do that. @thefinn, thanks. I have looked at this before but it is a bit over my head. I am pretty much a noob at this, trying to put together a mission that begins with an air incineration. I like the ATM option as I think I will start the game on Nimitz in the corner of the map and then "HALO" in, but only if I can get the AI to play. Any additional info would be great! Thanks again.

Share this post


Link to post
Share on other sites
  tazmania720 said:
Gents! Appreciate the feedback. @JShock, will this work wit AI squad members? I am fiddling with it and am not sure how to do that. @thefinn, thanks. I have looked at this before but it is a bit over my head. I am pretty much a noob at this, trying to put together a mission that begins with an air incineration. I like the ATM option as I think I will start the game on Nimitz in the corner of the map and then "HALO" in, but only if I can get the AI to play. Any additional info would be great! Thanks again.

If your going for AI, Finn's is better for you but the only issue with it is that it is a mod, not a standalone script. But if you decide to use it, then all you need to do is enable it and in each of the unit's that you want halo-ed in add the call line in their init fields.

Sorry read over the page too quickly, to use it simply do this and make sure to have the COB_halo folder pasted into your mission folder:

In your description.ext file:

class CfgFunctions 
{
class COB 
{
	class functions 
	{
		class HALO {file = "COB_HALO\functions\fn_halo.sqf"};
		class paradrop {file = "COB_HALO\functions\fn_paradrop.sqf"};
	};
};
};

class CfgSounds 
{
sounds[] = {}; 
class C130_exit 
{
	sound[] = {"COB_HALO\sounds\C130_exit.wss", 50, 1};
	titles[] = {};
};
class flapping 
{
	sound[] = {"COB_HALO\sounds\flapping.ogg", 10, 1};
	titles[] = {};
};
class open_chute 
{
	sound[] = {"COB_HALO\sounds\open_chute.ogg", 10, 1};
	titles[] = {};
};
class para_pilot 
{
	sound[] = {"COB_HALO\sounds\para_pilot.ogg", 10, 1};
	titles[] = {};
};
class close_chute 
{
	sound[] = {"COB_HALO\sounds\close_chute.ogg", 10, 1};
	titles[] = {};
};
};

Then in each unit's init field:

[this, 2000, true, true, true] call COB_fnc_HALO;
[unit, halo altitude, use chemlight, auto open chute, save loadout] call COB_fnc_HALO

Edited by JShock

Share this post


Link to post
Share on other sites

I don't think the one Finn suggested is an AddOn. Nothing in the file I downloaded looks like other addon's I have used. Could you explain a little better how to install and get this going?

Share this post


Link to post
Share on other sites
  tazmania720 said:
I don't think the one Finn suggested is an AddOn. Nothing in the file I downloaded looks like other addon's I have used. Could you explain a little better how to install and get this going?

Updated my post, my reading too fast caused the issue :p. The Armaholic page shows all the installation material as if it's a mod, not just a script, don't know why :confused:.

Share this post


Link to post
Share on other sites

THANK YOU! I got this to work along with an AI. Now, and I apologize for my ignorance, how do I get the flag pole options to work?

Share this post


Link to post
Share on other sites

Put this in the init field of whatever object you want to (make sure to make a "scripts" folder and place the flagHALO.sqf file in it):

this addAction ["<t color='#2bf000'>HALO JUMP</t><br/><img size='3' image='\a3\ui_f\data\gui\cfg\CommunicationMenu\supplydrop_ca.paa'/>", "scripts\flagHALO.sqf"];

Share this post


Link to post
Share on other sites

Got this going now, but after initial insertion and with team on the ground, using the flag with the above INIT, only I go back up, and squad is left on the ground. I also don't have a chem light attached anymore.

Share this post


Link to post
Share on other sites

Ok so when you downloaded COB, it's in a mission folder (name: "HALO.Stratis"), within that folder are two folders: "COB_HALO" and "scripts" , make sure to copy both those over into your mission folder, then add the necessary stuff for the description.ext file and the unit init field's as I stated earlier. Then in some object (can be whatever you want, i.e. a flagpole) put my last post's code line into that object's init field.

Damn page jumped on me, ugh I should stop doing this stuff so late.

And what Finn said.

And from what I see in the code, the chemlight is detached once the player hits the ground.

Edited by JShock

Share this post


Link to post
Share on other sites

The chemlight is indeed detached, I got rid of it personally. I'm using the script as the opening part of a mission I'm currently working on.

If you open up description.ext, you will find this in there the part pertaining to cfgfunctions. This is where you turn the simple sqf file into a function you can then "call".

So you'd then have description.ext and fn_halo.sqf and the sounds folder. (I removed the COB directory altogether and just made the necessary location changes in description.ext).

description.ext:

  Reveal hidden contents

Then in a soldiers' initialization window I just put:

[this, 3000, false, true, true] call COB_fnc_HALO;

The false there turns the chemlight off.

Share this post


Link to post
Share on other sites

Let me see if I can explain this better. My initial idea for a mission was to have a HALO insertion for the very beginning, more specifically free-falling when the game fully loads up, hence why I was asking for a basic script to put in the INIT block of the playable units with an auto-open for the AI. Now, with your guys help, I am going to start the mission in a different location, like the flight deck of the Nimitz, and then after a mission brief all players will activate the trigger and insert. With my testing last night, when I triggered the HALO from the flagpole, only my unit went airborne. The AI squad member stayed on the ground. In regards to the chemlight, there is one attached to the helmets if I started the mission freefalling, but when doing another HALO from the flagpole it did not appear again. The chemlight is the least of my worries now. What I really need is for when I trigger the HALO, all AI members of the squad go airborne. Thanks!

Share this post


Link to post
Share on other sites

I went live with my mission last night. Thanks for the info, it was received very well!!! I went with the ATM Airdrop for the time being as I still can't figure out why the AI with the AI HALO doesn't jump with the player. That an I noticed a lot of folks talk about it not working in MP. I did get an answer to my original question, which is:

this addBackpack "B_Parachute"; [1900] call BIS_fnc_setHeight; 0 = this spawn {waitUntil {getPosATL _this select 2 < 200}; _this action ["openParachute"];};

I would still like some help getting the AI HALO script to work. Thanks!!!

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  

×