Jump to content
Sign in to follow this  
norrin

Example scripts that use the attachTo command

Recommended Posts

I'm having some issues unloading whatever I'm transporting. I'm only able to manipulate whereever I'll unload in front or behind my transportvehicle by changing the * sin value.

_mountVcl setPos [(getPos _vcl select 0) - (5 * sin _vclDir), (getPos _vcl select 1) - (5 * cos _vclDir), 0];

But how can I unload to the sides as well...?

fx. three meters in front and two meters to the left of my vehicle...?

Share this post


Link to post
Share on other sites

Been away for a while, but got some time to play again lately.

This script caused me some issues

_mountVcl setPos [(getPos _vcl select 0) - (5 * sin _vclDir), (getPos _vcl select 1) - (5 * cos _vclDir), 0];

-but as blakeace suggested this worked as a charm instead...

_worldPos = _vcl modelToWorld [-3,7,0];

_mountVcl setPos [_worldPos select 0, _worldPos select 1, 0];

Share this post


Link to post
Share on other sites

To implement in your own missions

1. Copy the heliDoor folder from the test mission into your mission file.

2. Create a UH-1 in the editor and name it, , then in the chopper’s init box put:

Code:

nul = [this] execVM "heliDoor\heliDoor_init.sqf";

am i supposed to do this ingame or by copying the helidoor file from the C:\Program Files\Bohemia Interactive\ArmA 2 for example. i can get the test mission to work but i dont know how to do it myself in my own 2d mission editor

and if i need to do this ingame, how do i do it?

Share this post


Link to post
Share on other sites
To implement in your own missions

1. Copy the heliDoor folder from the test mission into your mission file.

This means copy the scripts file, while retaining its folder structure into the folder that contains the mission you are using the script in.

2. Create a UH-1 in the editor and name it, , then in the chopper’s init box put:

Code:

nul = [this] execVM "heliDoor\heliDoor_init.sqf";

This is done in the editor in the same mission that you copied the script files to, so that the helicopter will call the script.

Share this post


Link to post
Share on other sites

Hello,

Been using the heli door scripts, have a problem..

If the player moves to the door to fire, then gets back into the cargo seat, then gets out of the helo.....

The normal key press functions are not returned back to the player, in other words, none of the keys work, anyone know how to return the keys back to the player.

Thanks,

-AD

Share this post


Link to post
Share on other sites

Yep, exactly as ADuke said. Script works fine, if heli isnt moving or on the ground. But when i get back from the door to the cargo seat or out of the chopper, I'm unable to do anything with my keyboard...nothing works...WASD, reloading, jumping..not even Esc. Any way to solve this?

Share this post


Link to post
Share on other sites
Yep, exactly as ADuke said. Script works fine, if heli isnt moving or on the ground. But when i get back from the door to the cargo seat or out of the chopper, I'm unable to do anything with my keyboard...nothing works...WASD, reloading, jumping..not even Esc. Any way to solve this?

Try this: http://norrin.org/downloads/ArmA2/attachTo/heliDoor03.utes.rar

Share this post


Link to post
Share on other sites
You can walk around in the C130, once you're inside. The collisionmodel just wont let you enter. So this can be done my making some sort of "enter cargospace" action. Not the most realistic solution but better than nothing.

Now, I've promised an cargoscript haven't I ?

Here it is. Oh and geolox, I've had the same idea. Those animations are already included in the script :).

cargoscript.sqf

Put this in your c130 init or use it somewhere else.

[this] execVM "cargoscript.sqf";

Features:

- loading/unloading of all landvehicles and boats in c130 cargo, limited only by their dimension

- animated ramps (they open before loading/unloading and close afterwards

- unload in midair and your cargo gets drop with a parachute

- passengers of a vehicle in cargo are moved on a c130 seat when they leave their vehicle while in cargospace (noone will accidently fall out of the plane ;P)

- the vehicle you want to load has to be placed near the ramp

I've not tested this in multiplayer yet and it may need some adjustments for this use. Singleplayer should be fine though.

the link is dead can somebody provide a working mirror for the file cargoscript.zip?

Share this post


Link to post
Share on other sites

HI Norrin

Hope Im not digging up old info. having a problem with the sitontopvcl script. Im using it with an AAV. I see the action menu option to sit and it moves me to the top of the vehicle as planned. When I hit Insert though its not detaching me and Im stuck on the vehicle with not keys working to pull up the menu. I essentially have to kill the game to get out. This is in multiplayer. Ever seen this?

Share this post


Link to post
Share on other sites

@ gunterlund21 - one of the patch updates broke the chopper door script as well - a similar thing was happening, but I fixed that one a little while ago. It's probably likely that I need to make similar changes to the AVP so its compatible with the latest release. Very pressed for time at the moment so I don't know when that will be - sorry.

Share this post


Link to post
Share on other sites

I know the limitations of the attach to commande and the inability to move the aim without using alt.

I put together a basic alternative in a recent mission, involves attaching a DKSHM minitrip to the side of the helicopter, deletecollection it, and remove all its weapons.

Then have an action in the vehicle (AH6X so only 2 places to sit) that can only be called by the passenger while he is in.

This script would unaasign the chopper from the player, put him in the DKSHM and replace the DKSHM weapons with his, then the DKSHM has an action (again only callable by gunner) that does the reverse of putting him back in the chopper.

Only bug is AI tend to freak if they are piloting and start spinning when you go to the gun, fixable by just telling the pilot where to go again and he gets on with it. same for getting back in.

if anyone wants a copy (its still a WIP) then let me know.

cheers

Share this post


Link to post
Share on other sites

i feel like a noob but i copied the folder into my mission folder but it says the script isnt found any help? thanks

---------- Post added at 06:39 AM ---------- Previous post was at 06:26 AM ----------

nvm im a noob i figured it out

Share this post


Link to post
Share on other sites
Here's another one.

Tow aircraft script

AUGUST 2009

by norrin

based on an idea from David Campagna

tested in ArmA v1.03 on dedicated server

Download

http://norrin.org/downloads/ArmA2/attachTo/towC130.utes.rar

Description

Script allows you to tow aircraft around using the US towing tractor

How it works

Jump in the tow tractor and back up towards the front of an aircraft - make sure you are facing almost the same direction and you will get an action to tow the aircraft. This attaches the plane to the tractor. While attached you get an action to unattach the aircraft.

To implement in your own missions

1. Copy the c130tow directory to your mission file.

2. In the init line of the tractor put:

nul = [this]execVm "c130Tow\c130Tow_init.sqf";

I tried this in CO just now (offline), and it only a couple of times out of about 10 tries. If anyone knows how to fix/updated this script, that would be way cool.

It's just so unfortunate that the tow tractor is only for looks, and doesn't actually tow anything.

Share this post


Link to post
Share on other sites

Can we have any hope that the scripts will be reuploaded or the site will be back online?

Share this post


Link to post
Share on other sites

Hello guys i m trying to use this on ACE. Any idea why my controls get all wierd ones i get out of the heli? I cant seem to walk or do anything. Sorry i m using the door gunner script

Share this post


Link to post
Share on other sites

when i go into the mission folder in arma 2 OA the user missions are not there that i have saved. it is the steam version of A2 OA + A2 running through SIX Updater. i cannot install new scripts into the game because of this. can anyone help?

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  

×