Helicopter scripts??

ArmA editing, missions, modeling, textures, terrains

Moderators: Lone Wolf, Snake Man

Post Reply
bigstone
1st Lt
Posts: 101
Joined: 2005-07-24 22:01:01
Location: San Diego

Helicopter scripts??

Post by bigstone » 2007-10-02 00:31:08

Does anyone know where I can find helicopter scripts for arma? I would like to have my helicopters prior to take off to load troops and fly to destinatiion to land and unload troops. I tried on mu own, not know what to type in the ini line for each chopper to ladn and unload its troops loads??? I mean when the choppers arrive to the LZ they just stay hovering stationary??? Please help thank you. :D

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-10-02 01:06:55

You dont need any scripts for that.

First place helicopter unit, name it "helo1", then create infantry squad and its group leaders init line write:

Code: Select all

{_x moveincargo "helo1"} foreach units group this;
Then place waypoints for the helicopter, make it TRANSPORT UNLOAD and then add one more waypoint back to base or where ever you want. Now when the mission starts the helo will take off, fly into the waypoint and unloads the cargo which is the infantry squad.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

bigstone
1st Lt
Posts: 101
Joined: 2005-07-24 22:01:01
Location: San Diego

Post by bigstone » 2007-10-02 01:14:18

Thank you I shall try it out. :D

bigstone
1st Lt
Posts: 101
Joined: 2005-07-24 22:01:01
Location: San Diego

Post by bigstone » 2007-10-02 02:03:47

OK Snake Man I tried the above ini line and I get an error upon mission loading Error Generic error in expression??? :?

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-10-02 02:52:06

Thats how it works, are you SURE you put the command in infantry group leaders init line (and NOT in the description line)?
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

bigstone
1st Lt
Posts: 101
Joined: 2005-07-24 22:01:01
Location: San Diego

Post by bigstone » 2007-10-02 02:55:26

Snake Man wrote:Thats how it works, are you SURE you put the command in infantry group leaders init line (and NOT in the description line)?
I sure did??? If your talking about the initialization line of the squad leader then yes.

T_Rex
FreeFalcon
Posts: 848
Joined: 2001-03-04 23:01:01
Location: here

Post by T_Rex » 2007-10-03 13:59:57

I don't know if this will help, but there's a script here:
http://www.ofpec.com/ed_depot/index_new ... sc&cat=xyz

That says it makes a helo follow the waypoints and land at a specific place.

Some other useful stuff there, too, potentially. :)
Sic Semper tyrannosauro.

bigstone
1st Lt
Posts: 101
Joined: 2005-07-24 22:01:01
Location: San Diego

Post by bigstone » 2007-10-03 19:29:17

Thanks guys I forgot to remove the quotation marks from helo1....Duh now it works.

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-10-03 19:47:48

Crap, actually that was my bad, hehe, just checked the syntax from a real mission and yeah there is no quotation, damn, sorry man.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

bigstone
1st Lt
Posts: 101
Joined: 2005-07-24 22:01:01
Location: San Diego

Post by bigstone » 2007-10-04 06:59:09

No problem s!@t happens. :wink:

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-10-04 07:07:09

Let me make it up to you, here is few additional tips.

If you want to use SCRIPT to unload squad from helicopter, this is how you do it with SCRIPT. Lets assume the squad group name is "assault1" (without quotations!) and helo name is "helo1"...

So when you want to give the squad leader command "get the heck outta the chopper!" you do this script command:

Code: Select all

{unassignVehicle _x} forEach units assault1;
This method if assigning the same group into helo so that they arent instantly moved in, when you give this order the helo will land (if flying) and squad will move into the helos cargo. So do this:

Code: Select all

{_x assignAsCargo helo1; [_x] orderGetIn true} forEach units assault1;
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

bigstone
1st Lt
Posts: 101
Joined: 2005-07-24 22:01:01
Location: San Diego

Post by bigstone » 2007-10-04 09:00:51

Thank you check your email. Your knowledge has helped me alot as far as helicopter ops are concerned. Have you seen We Were Soldiers or Hamburger Hill???

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-10-04 12:58:10

Yes, actually I was planned on taking a break from editing and watching We Were Soldiers tonight. Hamburger Hill is on the desk on queue to be watched after many years, actually I dont remember nothing about the movie.

Anyways, if you have any helicopter editing question, just shoot and I'll try to explain.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

T_Rex
FreeFalcon
Posts: 848
Joined: 2001-03-04 23:01:01
Location: here

Post by T_Rex » 2007-10-04 13:04:25

Hey SM-

Let's say you have a large helo and need to load 2 (or more) squads. Do you just put that script into the squad leader for each one, and the helo will wait for all of them to load?

And what if you wanted to somewhat "set a trap" for the player so that when the helo touched down, it was automatically damaged to the extent that it could not fly anymore? I vaguely recall in OFP that there was a trigger you could set so that it would cause a certain amount of damage.

And if you'd prefer these questions in another thread - just let me know. :)
Sic Semper tyrannosauro.

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-10-04 13:26:23

T_Rex wrote:Let's say you have a large helo and need to load 2 (or more) squads. Do you just put that script into the squad leader for each one, and the helo will wait for all of them to load?
Yes, or you can do it anywhere else like in init.sqf or other place, even for the helos or the "other groups" init line. It really doesn't matter where you activate the command, its just a command which ArmA understands.

Of course if you dont have name for the group, then you must run the command on each of the groups init line with bit different syntax.

All right lets see, the existing command was for "assault1" named group and helo called "helo1" which went like this:

Code: Select all

{_x assignAsCargo helo1; [_x] orderGetIn true} forEach units assault1;
But if I want to add two groups in there, I can do this:

Code: Select all

{_x assignAsCargo helo1; [_x] orderGetIn true} forEach (units assault1 + units specops1);
Assuming the other groups name were "specops1". The () which was added there... I'm not sure if you need them with the + sign, I usually use them as sometimes I've gotten errors doing some calculations or stuff without them.
when the helo touched down, it was automatically damaged to the extent that it could not fly anymore?
Okay this is more difficult... if the helo is named same and we have trigger in the area with proper sized radius where the helo is to be damaged, I'd do it like this. On the triggers condition line it would read:

Code: Select all

helo1 in thislist && (getPos helo1 select 2) < 2
That line basically would check two conditions:

1) unit called "helo1" is on the area of this trigger.
2) helo1 units altitude is less than 2 meters.

When both are true, used with the "&&", the trigger activates. You can also use "AND" instead of the double & characters to do the comparison.

Oh btw I have not tested that ingame, but thats how I recall it. Try it out and if it doesn't work we'll investigate further.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

bigstone
1st Lt
Posts: 101
Joined: 2005-07-24 22:01:01
Location: San Diego

Post by bigstone » 2007-10-04 16:22:37

Snake Man wrote:Yes, actually I was planned on taking a break from editing and watching We Were Soldiers tonight. Hamburger Hill is on the desk on queue to be watched after many years, actually I dont remember nothing about the movie.

Anyways, if you have any helicopter editing question, just shoot and I'll try to explain.
Thank you :D

T_Rex
FreeFalcon
Posts: 848
Joined: 2001-03-04 23:01:01
Location: here

Post by T_Rex » 2007-10-12 02:32:04

I have the mapfact air and misc addons, but I can't figure out how to get the new vehicles into the editor...

It says I need to add "game logic" in the editor, and I believe I've done that. Placed the little blue flag, with the name MAP_AirWeapons_Logic (for instance).

I suspect I'm making this more complicated than it needs to be, but I can't figure it out.

Thanks. :)
Sic Semper tyrannosauro.

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-10-12 03:45:46

This has like zero to do with helicopter scripts, but hey what ever makes the add package to have more chance...

To place new addon vehicle on editor/mission is very easy, in this particular case you dont need any gamelogics to get the addon vehicle into editor. Ok when you are in the mission editor, press F1 that you are sure in the single unit mode, then double click on the map where you want the unit to be placed, then a dialog pops up. Then choose BLUFOR, then choose Air (or in this particular case Mapfaq-air or something like that), then choose the individual unit you want.

Another item which I like to do myself is that air units I usually place with highest skill and not of rank of Private. So lets say you want to place helicopter gunship, its rank of umm maybe Lieutenant and skill slider all the way to the right in max.

Then you also have the hmm... hehe one field between rank/skill slider which naming I cant remember now (can you believe that, been editing for freaking 6 years and I cant remember that, sigh) but there is options None, In Cargo, Flying, In Formation. The descriptions for gunship helo are:

None = its placed on ground, engine not on, precisely on that location.
Cargo = its placed on ground, engine not on.
Flying = its placed on air, engine on, ie flying.
Formation = its placed on ground, engine not on and it appears on formation if any other units is on the same group.

So there. F1, double click map, choose unit from the categories... done.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

T_Rex
FreeFalcon
Posts: 848
Joined: 2001-03-04 23:01:01
Location: here

Post by T_Rex » 2007-10-12 04:08:16

Snake Man wrote:This has like zero to do with helicopter scripts, but hey what ever makes the add package to have more chance...
LMAO :D

Actually, I didn't know it doesn't have anything to do with helo scripts. :)

I think I put the mapfact pbos in the right place. Actually, I just copied the @Mapfact folders (with included addon folders) into the ArmA directory. That seemed to work with the other addons. But, when I place the units (F1/double click) I only get the standard air assets.

But ahhhh in re-reading, perhaps I didn't look closely enough for a "mapfact-air"!

:thumbs:

Edit: yeah, there's no selection for mapfact air. I'll check around mapfact site and BIS.

Oh, and does it count as long as I'm trying to add a helo? ;) :)
Sic Semper tyrannosauro.

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-10-12 06:53:39

You need to start ArmA with the mod directory setup, like

Code: Select all

\ARMA_ROOT\arma.exe -mod=@Mapfact
if you had the "@Mapfact" dir on your ... arma dir. Or you can just dump the addon .pbo files into armadir\addons\ dir, but I would highly recommend the mod directory setup as I've shown above.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

T_Rex
FreeFalcon
Posts: 848
Joined: 2001-03-04 23:01:01
Location: here

Post by T_Rex » 2007-10-12 12:42:12

Ah, ok.

What if I have multiple @dirs that I want to use? (Thanks for all the help.) :)
Sic Semper tyrannosauro.

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-10-12 13:01:21

Okay this is the last tip offtopic, for forther help I'm really glad to help, but please open a new topic :)

Oh you want nasty -mod dir command line, well hows this:

D:\ArmA\arma.exe -nosplash -world=empty -profiles=d:\ArmA -mod=x\coc;x\pmc;x\insurgent;x\terrain;x\csm;x\dm;x\six

So in a nuthshell, -nosplash skips the intro images (apparently this DOESNT speed up the loading though, Suma said so on BIS forums himself), -world=empty definitely speeds up as it wont load any island (rahmadi) at start. -profiles is where your Users/ dir is saved. Then the mod dirs, all separated by ; character, add as many you please.

I like to categorize those addons as you might see there, I dont like to do one big chunk of mod dir.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

T_Rex
FreeFalcon
Posts: 848
Joined: 2001-03-04 23:01:01
Location: here

Post by T_Rex » 2007-10-12 13:40:51

Ooof - yeah, this has strayed too far. Sorry. :(

But, is there a site/tut with that kind of information about how to set stuff up? I downloaded the ArmA launcher, but haven't set it up yet. I'll probably end up going that route.

Thanks. :thumbs:
Sic Semper tyrannosauro.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests