View Full Version : Example scripts that use the attachTo command
Scripted Ride On APC
Practical uses of the attachTo command Part 1
© JUNE 2009 - norrin
Description
Suite of scripts that allows up to 4 players to ride on the top of an APC. From there they can stand, crouch, turn around, shoot reload and disembark
Download
http://norrin.org/downloads/ArmA2/attachTo/onTop2.utes.rar (Updated 080609)
To implement in your own missions
1. Copy the sitOnTopVcl folder from the test mission into your mission file.
2. Create an AAV in the editor, name it (eg. AAV1), then in the APC’s init box put:
nul = [this] execVM "sitOnTopVcl\mount_vcl_init.sqf";
3. Create playable units and name them in the editor.
To use
1. Run up to the AAV and you will get the option to ride on top.
2. Once you are on top and attached you can;
a/ turn around using the “delete” and “end” keys
b/ disembark using the insert key – this will unattach you from the vehicle and you can just walk off using the “W” key.
c/ reload using the “R” key
d/ aim and target within a limited arc, bring up the iron sites, the use the “alt” key to move your aim around – for gross changes in direction use the turn around keys listed above.
Tested
On a dedicated server but without multiple players
Hopefully something similar will be applicable to choppers and I'll start work on that next week
http://norrin.org/images/ArmA2/attahTo.jpg
Put Bike in pick-up
Practical uses of the attachTo command Part 2
revision 1 (080609)
Description
A script that allows you to put a bike on the back of a pick-up, drive it round then unmount the bike.
Download
http://norrin.org/downloads/ArmA2/attachTo/loadOnTruck01.utes.rar
To implement in your own missions
1. Copy the mountOnVcl folder from the test mission into your mission file.
2. Create a pick-up in the editor and name it, , then in the trucks init box put:
nul = [this,"bicycle"] execVM "mountOnVcl\mount_vcl_init.sqf";
3. Create a player in the editor and name it.
4. Create a bike in the editor.
To use:
1. Move close to vehicle make sure a bicycle is close at hand and the use the action: "Mount on Vehicle"
2. You can then drive around - note the bikes pedals go around as you drive the car. :)
3. Get out of the car and "Dismount bike from car".
Tested
Dedicated server by myself
http://norrin.org/images/ArmA2/mountedBike.jpg
Put car in C-130
Practical uses of the AttachTo command Part 3
Description
A script that allows you to put a car or hummer etc in the cargo section of a C-130, fly it round then unmount the vehicle.
Download
http://norrin.org/downloads/ArmA2/attachTo/Hercules01.utes.rar
To implement in your own missions
1. Copy the mountOnC130 folder from the test mission into your mission file.
2. Create a pick-up in the editor and name it, , then in the C130's init box put:
nul = [this,"car"] execVM "mountOnC130\mount_vcl_init.sqf";
3. Create a player in the editor and name it.
4. Create a car of some sort in the editor.
To use:
1. Move close to the rear of the C130 make sure a car is close at hand and then use the action: "Load vehicle on C-130"
2. You can then fly around.
3. Get out of the plane then "Unload Vehicle".
Tested
Dedicated server by myself
Other Notes
You can probably put just about anything into the C-130, just makes sure you put the correct class in the C130's init box line, you may also need to change this line
_mountVcl attachTo [_vcl,[0,0,-2]]; in the mount_vcl.sqf which you can find in the mountOnC130 folder.
http://norrin.org/images/ArmA2/herc.jpg
Move to helicopter door and fire
Practical uses of the AttachTo command Part 4
Description
A script that allows you to move from the seat position within a UH-1 to the door way so that you can fire outside while the chopper is moving.
Download
http://norrin.org/downloads/ArmA2/attachTo/heliDoor.utes.rar
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:
nul = [this] execVM "heliDoor\heliDoor_init.sqf";
3. Create a player in the editor and name it.
To use:
1. Get in the chopper once inside you should get an action that allows you to move to the left or right door
2. To aim: bring up the iron sights and hold the alt key to move your aim point around
3. Press "R" to reload
4 Press "INSERT" to move back to your seat - NB you will need to do this to disembark the chopper
Limitations
If the chopper is accelrating or decelerating hard you may bob around a bit inside while at the doors and may not be able to shoot - unfortunately this is a limitation of the
attachTo command. When in level flight it seems to work really nicely.
Test Mission
Get in the back of the chopper and then move to the door (you can also do this while in flight). Order the pilot to move to a position on the map. Try moving to each door and
back again.
Tested
On a dedicated server by myself
http://norrin.org/images/ArmA2/3rdP_heliDoor.jpg
CarlGustaffa
Jun 4 2009, 11:23
Do we have possibility to change the direction of the attached vehicle? Could allow some interresting towing effects.
That shouldn't be too hard to include mate, but its going to be a little while before I can do more with these scripts as the scripting jobs are already starting to pile up for ArmA2 - this script was more a proof of concept to show that it can be done, adding different vehicles/carrying possibilities and tightening up the code will take a little longer, the APC script on the otherhand is hopefully a bit more advanced.
Do we have possibility to change the direction of the attached vehicle? Could allow some interresting towing effects.
Using setdir you can, would be a challenge but not impossible, just need to use some clever maths to work out when to make it turn I suppose
Awesome, Norrin! Thanks for sharing.
schaefsky
Jun 4 2009, 11:52
Yeeeeeeeehaaaaaaah! Great, thank you very much!
Manzilla
Jun 4 2009, 11:56
Excellent!
dale0404
Jun 4 2009, 12:00
Mission possibilities are endless!
Commando84
Jun 4 2009, 13:00
btw have any one tried with a ammo crate in a pick up? or a ural truck? :)
IceShade
Jun 4 2009, 14:14
Do we have possibility to change the direction of the attached vehicle? Could allow some interresting towing effects.
Plenty of other threads with attachTo examples (like the 3 page thread here (http://forums.bistudio.com/showthread.php?t=73387&page=3)).
Use setDir to change the direction of the vehicle. If you're using this in multiplayer, add another line "myObj setPos getPos myObj" to sync with every client, otherwise setDir will be local and not do anything (useful). setDir is linked to the vehicle you're going to attach it to. So if you use setDir 180, it won't actually point south, but point towards the rear of the vehicle (which is excellent).
Great. As always!
Could BIS implement this for the next version (European + US )?
thegunnysgt
Jun 4 2009, 18:52
Not trying to change the subject, but could something like this work for transporting vehicles in the C-130, using just one or two attachTo points inside the cargo area? To load and unload you would bring the vehicle to the back of the plane and select to load it and it is then attached inside the cargo area, and to unload you select to unload and it brings the vehicle back to the back of the plan.
Could it be possible?
This is very possible. All you need to do is work out the attachTo points in your vehicle of choice. The rest can be done by scripting actions to appear under certain conditions eg there is both a box of ammo and a player within 5 metres of a C-130 get action load ammobox etc. The only problem is that things sometimes jiggle around a bit while attached and the object that its attached is moving so it can look a little weird doing things this way.
schaefsky
Jun 5 2009, 11:15
And to make things a little ugly I propose adding config entries for every vehicle as a static object so wheels don't turn. :eek:
Put car in C-130
Practical uses of the AttachTo command Part 3
Description
A script that allows you to put a car or hummer etc in the cargo section of a C-130, fly it round then unmount the vehicle.
Download
http://norrin.org/downloads/ArmA2/attachTo/Hercules01.utes.rar
To implement in your own missions
1. Copy the mountOnC130 folder from the test mission into your mission file.
2. Create a pick-up in the editor and name it, , then in the C130's init box put:
nul = [this,"car"] execVM "mountOnC130\mount_vcl_init.sqf";
3. Create a player in the editor and name it.
4. Create a car of some sort in the editor.
To use:
1. Move close to the rear of the C130 make sure a car is close at hand and then use the action: "Load vehicle on C-130"
2. You can then fly around.
3. Get out of the plane then "Unload Vehicle".
Tested
Dedicated server by myself
Other Notes
You can probably put just about anything into the C-130, just makes sure you put the correct class in the C130's init box line, you may also need to change this line
_mountVcl attachTo [_vcl,[0,0,-2]]; in the mount_vcl.sqf which you can find in the mountOnC130 folder.
http://norrin.org/images/ArmA2/herc.jpg
I've also tidied up the load bike on van code - see the first post for updated script. There's a new way to implement this script so make sure you read the new implementation notes
Finally, the chopper script is not far away - just having some probs with the set direction command with attached (attachTo) units, but soon you'll be able to get out of your seat and move to the open door of a chopper and start shooting your rifle.
Sorry to double post but I thought this was worthy of its own post - hope this is OK.
Move to helicopter door and fire
Practical uses of the AttachTo command Part 4
© JUNE 2009 - norrin (norrin@<hidden>)
Description
A script that allows you to move from the seat position within a UH-1 to the door way so that you can fire outside while the chopper is moving.
Download
http://norrin.org/downloads/ArmA2/attachTo/heliDoor.utes.rar
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:
nul = [this] execVM "heliDoor\heliDoor_init.sqf";
3. Create a player in the editor and name it.
To use:
1. Get in the chopper once inside you should get an action that allows you to move to the left or right door
2. To aim: bring up the iron sights and hold the alt key to move your aim point around
3. Press "R" to reload
4 Press "INSERT" to move back to your seat - NB you will need to do this to disembark the chopper
Limitations
If the chopper is accelrating or decelerating hard you may bob around a bit inside while at the doors and may not be able to shoot - unfortunately this is a limitation of the attachTo command. When in level flight it seems to work really nicely.
Test Mission
Get in the back of the chopper and then move to the door (you can also do this while in flight). Order the pilot to move to a position on the map. Try moving to each door and
back again.
Tested
On a dedicated server by myself
http://norrin.org/images/ArmA2/3rdP_heliDoor.jpg
PS: Also fixed the rotate function of the "Ride on Top" of APC scripts so if you're interested you may want to re-download that script as well.
Great scripts norrin. Thx a lot ^^
nullsystems
Jun 8 2009, 19:30
Few examples, some silly ones.
http://www.youtube.com/watch?v=DyQ6qTjrmgY
vengeance1
Jun 9 2009, 01:39
Nice Job NORRIN good to see you diving right in on ARMA 2. Looking forward to see what you come up with.
:)
Dr_Eyeball
Jun 9 2009, 02:43
I was playing around with a way to launch landing craft from the LHD. This is just a test version exploring possibilities. It doesn't support AI. I presume this rig is meant for some sort of boat hoisting.
http://i111.photobucket.com/albums/n125/Dr_Eyeball/Arma2/Misc/th_LHD_BoatLaunch.jpg (http://s111.photobucket.com/albums/n125/Dr_Eyeball/Arma2/Misc/LHD_BoatLaunch.jpg)
Download test mission: LHD_BoatLaunch.utes.pbo (http://www.armaholic.com/page.php?id=5921)
To use:
- there's an action on the towing tractor to teleport to the boat launch platform (since there are no stairs).
- turn on the boat engine to launch the boat into the water
- turn off the boat engine to lift the boat back into the hoisting rig while under it
- use 'get out' to get back on platform
- then use action on the warning signs to teleport to deck (the signs also prevent you from slipping off the launch platform)
Design hurdles and findings:
- it seems you can't use the LHD to attach the boat since the boat keeps dropping every 1 second as if the attach is not checking it regularly enough. Therefore I used the towing tractor for all attach and teleport actions.
- facing the boat at 180 make the default getin/getout actions work better without falling in water
- It's a shame the rear LHD dock doors are closed. It would have been better just to leave them open, since the water is already usable inside the bay. Hope they improve that.
Jantemplar
Jun 9 2009, 05:01
If any one has any ideas on how to get a cargo chute attached to a vehicle while it being ejected from the back of a c130 let me know, i have tried attaching humv's and all sorts using attachTo but yet it seems to attach to them but its on the ground and never in the air, any one got any ideas.
Norrin, fantastic work as always mate. What's next? trying to take over the world!? :)
Jamie.
Helmut_AUT
Jun 9 2009, 08:04
These are some of the coolest things I've seen yet in A2. For those scripting impaired - maybe once you are satisfied with a bunch of these scripts, could they be converted to a logic that can simple be synched with either the player or the vehicle it's used with?
Hmm guess everyone fell in love with the AttachTo :P hehe.
Someone mentioned using it for towing... don't do it. In this specific case youre better of using setpos since a rope is somewhat flexible and with the attachto it would look like whatever is beeing towed is fixed on the end of a stick. Setpos in combination with setvelocity and velocity does a pretty decent job for this. I can post some snipplets if required.
Well about that c130-cargo thing. I've been thinking about that too and seeing this, I guess I'll start making a script for it too. However I think it would be nice to avoid having setup it for all sorts of vehicles. Why not make it dynamic? Im thinking about using the boundingBox command along with the attachTo. It would allow to define a space inside the c130, that can be used for cargo and the script would then allow any object that is small enough to fit into that space to be loaded. Boundingbox should also allow to adjust the attachto - position automatically.
If everything goes right, we will end up with an script that allows us to load up virtually every vehicle in the c130, even those from new addons.
Making them dropable by a cargochute shouldn't be much of a problem, so lets add that too. :D Btw, Jantemplar you have to attach the object to the chute, not the chute to the object.
Let me take care of that cargo-thingie, I'll report back to this thread when I have something to show ;D
Jantemplar
Jun 9 2009, 10:52
Awesome Tajin. Thanks for that, hopefully i will get better eventually.
@<hidden> - Not quite mate, but there is this:
The Rabbit of Caerbannog
Absolutely Ridiculous Uses of the AttachTo command
"That's no ordinary rabbit!"
Description
Turns a rabbit into a killing machine
Download
http://norrin.org/downloads/ArmA2/attachTo/Killer_bunny.utes.rar
To implement in your own mission
1. Copy across the killer_bunny folder into your mission folder
2. Create a playable rabbit (it could be any type of animal really) and put this in its init line: nul = [this] execVm "killer_bunny\kill_action.sqf"
To use
Just run up to a person and use the "Kill pesky human" action when you get within 5 metres.
Limitations
If a player is crouching the bunny will attach in thin air - if people are really interested I can fix this
Short movie of killer bunny in action (http://www.youtube.com/watch?v=wpVo82ynYJI)
http://norrin.org/images/ArmA2/killer_bunny.jpg
PS: If someone's is good at creating blood spurts I've got a little job for you.
What can i say but... HAHAHAHA!!
Funny stuff Norrin! :) Gotta love the MP boys. And very cool you all exploring this commands possibilities. I cant wait til i get my copy of ARMA2 so i can start create some cool (also useful :) ) attachements.
Good job so far!
Regards
Alex
Best new feature in ArmA II ! :yay:
Thank you Norrin for the information and the effort.
froggyluv
Jun 9 2009, 14:23
Almost spit out my morning cup of joe when I saw this - love it!
I'm forseeing a Zombie Bunny with possible Lasers mod in route...
LOL...greetings from Monty Pythons :p
Nice idea :cool:
One small suggestion for the C-130 is adding the following lines to open the cargo ramps before the car is moved inside (see original post from Tomsen http://forums.bistudio.com/showthread.php?p=1304021#post1304021)
this animate ["ramp_bottom",1];
this animate ["ramp_top",1];
If you want the side doors open too just put:
this animate ["door_2_1",1];
this animate ["door_1",1];
http://i180.photobucket.com/albums/x44/geloxo/Side.jpg?t=1244583340
Yes, the action is not available for the player but the animation is already there in the model.
http://i180.photobucket.com/albums/x44/geloxo/Back.jpg?t=1244583544
I hope this is useful for you.
Cheers
PhunkMaZ
Jun 9 2009, 22:01
It's a "nice to see" feature but you cant walk into the c130. The reason is not the height of the ramp but the collision model :( The same goes for the Osprey.
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 (http://tajin.evilhosting.de/arma/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.
Jantemplar
Jun 10 2009, 08:05
Awesome trying now m8
hmm i cant get it too work
Damn.
Wait, I'll give you the last tested version using two files. I've merged those two files into one, but I couldn't test it at the moment so maybe I have an small bug there somewhere that I didnt notice. However, the 2-file version should work.
http://tajin.evilhosting.de/arma/cargoscript.zip
Init:
[this] execVM "c130cargo.sqf"
Jantemplar
Jun 10 2009, 09:40
ty ill try agin
---------- Post added at 07:40 PM ---------- Previous post was at 07:29 PM ----------
Nice its working, next thing i have to figure out is to make it as a automated Vehicle respawn system :)
Commando84
Jun 10 2009, 19:59
I was playing around with a way to launch landing craft from the LHD. This is just a test version exploring possibilities. It doesn't support AI. I presume this rig is meant for some sort of boat hoisting.
http://i111.photobucket.com/albums/n125/Dr_Eyeball/Arma2/Misc/th_LHD_BoatLaunch.jpg (http://s111.photobucket.com/albums/n125/Dr_Eyeball/Arma2/Misc/LHD_BoatLaunch.jpg)
Download test mission: LHD_BoatLaunch.utes.pbo (http://dump.no/files/297990cb8fba/LHD_BoatLaunch.utes.pbo)
To use:
- there's an action on the towing tractor to teleport to the boat launch platform (since there are no stairs).
- turn on the boat engine to launch the boat into the water
- turn off the boat engine to lift the boat back into the hoisting rig while under it
- use 'get out' to get back on platform
- then use action on the warning signs to teleport to deck (the signs also prevent you from slipping off the launch platform)
Design hurdles and findings:
- it seems you can't use the LHD to attach the boat since the boat keeps dropping every 1 second as if the attach is not checking it regularly enough. Therefore I used the towing tractor for all attach and teleport actions.
- facing the boat at 180 make the default getin/getout actions work better without falling in water
- It's a shame the rear LHD dock doors are closed. It would have been better just to leave them open, since the water is already usable inside the bay. Hope they improve that.
man that seems awesome!!! :)
Love you guys for showing this! makes my wait for the Arma 2 much more bearable with all the cool discoveries that people make all the time :yay:
McKnight
Jun 10 2009, 20:54
For me the C-130 Script isnt working for some reason, I added it to a Herc but I cant start it with the Init line i always get a error.
Which C130 script are you referring to mate? The one by Tajin or the one by norrin? Either way can you post what you're putting in the init line please?
trini scourge
Jun 10 2009, 21:19
try: c130 = [this] execVM "c130cargo.sqf"
wow that latest c-130 script is awesome! Loading a humvve then fying over the drop zone and parachuting it is awesome!
CarlGustaffa
Jun 11 2009, 06:49
Can you make airdrop scipts as well? Some suggestions (http://www.youtube.com/watch?v=DopZgJaWstk) :)
Jantemplar
Jun 11 2009, 09:02
Can you make airdrop scipts as well? Some suggestions (http://www.youtube.com/watch?v=DopZgJaWstk) :)
http://forums.bistudio.com/showthread.php?t=74313
Glad you like the script Xavion, I'll probably post an updated version this evening when I get home. (could be late)
Multiplayersupport will be added later on, can't do this now. (ArmA2 still won't let me join any servers :( )
nullsystems
Jun 14 2009, 16:45
Some ideas, some funny.
I did make a mission the other week with Rabbits of Antioch, mine has exploding grenades coming out of the rabbits too.
http://www.youtube.com/watch?v=DyQ6qTjrmgY
Also: The C130 with a demo M2 on the back:
http://www.kellys-heroes.eu/forum/viewtopic.php?f=39&t=2591#p22227
is there anyway to change the distance from the vehicle (c130) that you get the load cargo option (further out)
could this be changed to add ammo crates that can be dropped parachuting ?
is there anyway to change the distance from the vehicle (c130) that you get the load cargo option (further out)
sure
_near = nearestObjects [_loadpos, ["Land","Ship"], 8];
look for this line in the code and change the "8".
PS.: the distance is measured from the ramp at the rear so if you had any problems getting things loaded up, just place them at the back of the c130.
could this be changed to add ammo crates that can be dropped parachuting ?
yup
_near = nearestObjects [_loadpos, ["Land","Ship"], 8];
same line as above, replace the "Land","Ship" with the classnames of the ammocrates or add them to the list.
Nephris1
Jul 6 2009, 14:06
Sry for being a nub in scripting, but what script are u referring to by using a ammo drop via e.g. playne and what it the script call?
This:
http://tajin.evilhosting.de/arma/cargoscript.zip
Init:
[this] execVM "c130cargo.sqf"
Posted in the same topic btw, so you only had to look at one of the earlier pages. :rolleyes:
the init is used in an c130, which is then able do load vehicles in its cargospace and unload or drop them.
Big Dawg KS
Jul 6 2009, 14:43
Before we all get carried away and start attaching shit like crazy, has anyone observed any strange side effects of using attachTo? I think it messes up AI's ability to target attached objects, they seem to just keep firing at its starting location. What about getPos on attached objects, anyone tried it?
Nephris1
Jul 6 2009, 14:53
Saw that but didnt get it working that way, so i supposed there wereanother one i missed:rolleyes:
Get an type script expect nothing error, by using it in the init.
GetPos should work as usual and I've never observed the AI problem.
Btw the AI do sometimes keep firing on a known position even when the target has moved (without them noticing) but tbh, I do the same thing.
Biggest issue is that attached Objects do not have collision detection.
Big Dawg KS
Jul 6 2009, 17:21
Yes I noticed that behaviour from AI, but I'm still not sure AI are capable of tracking attached objects with the same effiency as normal moving objects, which may or may not be related to lack of collision detection.
Master85
Jul 6 2009, 17:42
...
Biggest issue is that attached Objects do not have collision detection.
If I remember rightly there's something like collision detection for some vehicles like the M1A1 or the Ural. For other vehicles like the tractor I hear a collision-sound and the vehicle is damaged but it doesn't collide.
nicolasroger
Jul 7 2009, 08:25
Hmm guess everyone fell in love with the AttachTo :P hehe.
Someone mentioned using it for towing... don't do it. In this specific case youre better of using setpos since a rope is somewhat flexible and with the attachto it would look like whatever is beeing towed is fixed on the end of a stick. Setpos in combination with setvelocity and velocity does a pretty decent job for this. I can post some snipplets if required.
Can I have more information about this? I want to create a good towing script. I though about using attachto with a lot of Math, but mabye you have a better idea?
You'll need good maths in both cases. ;)
My script works like this:
_obj setVelocity [((_vel select 0)+_xdir*1.6)*_factor,((_vel select 1)+_ydir*1.6)*_factor,(((_vel select 2)+_zdir*3)*(_factor-0.3))-4];
It may look a bit cryptic at first... let me explain:
factor is an variable that I use for the length of the rope. In fact it is the deviation from the maxium length of the rope. If the distance is less, then no force will be applied to the towed object. If the distance is bigger than the length of the rope then the speed of the carrier will be added to the speed of the towed object, plus some damping.
If the distance gets too big however, the rope will break.
So the concept is rather simple and unlike normal towing scripts it can look quite realistic.
I think I'll rewrite mine sometime and finally release it one day. (unless I'm getting lazy again)
nicolasroger
Jul 7 2009, 17:31
thx. I don't have enought scripting experience right now to fully understand your script (specialy the variables like _vel ) but I get the basic information. I will continue to read about scripting.
By the way, your script use way less math than my initial idea so I guess I'll forget my idea lol
The code I've postet is only an extract. Most of the math happens before. ;)
_vel is the variable in which I store the xyz velocity of the chopper.
Anyway, that line of code was only an example. Good luck with yours, holler if you need anything for it.
Killy_McMurder
Jul 13 2009, 11:16
Damn.
Wait, I'll give you the last tested version using two files. I've merged those two files into one, but I couldn't test it at the moment so maybe I have an small bug there somewhere that I didnt notice. However, the 2-file version should work.
http://tajin.evilhosting.de/arma/cargoscript.zip
Init:
[this] execVM "c130cargo.sqf"
Ok, i'll get it out the way quick - I'm a noob. I know about <--this--> much about scripting, and i'm gettin a bit stuck with the c130 script, i've added the code to the init box on the unit, but i've obviously put the .sqf file in the wrong place because just as the mission loads i get a message saying it can't find the script. Where exactly do i need to put the .sqf file for it to work? Halp :confused_o:
Look under "MyDocuments" there should be an "ArmA2" folder somewhere then a "missions" or "mpmissions" folder and in there are folders for each mission you're building in the editor. Put the scripts in the folder of the mission you need them for.
Mr_Centipede
Jul 13 2009, 11:22
May I ask a question, does AI soldier using attachTo command can fire their weapon? if they can how is their accuracy? is it like normal or is it like static weapons? I'm figuring it could be made with a foxhole
Killy_McMurder
Jul 13 2009, 11:25
Look under "MyDocuments" there should be an "ArmA2" folder somewhere then a "missions" or "mpmissions" folder and in there are folders for each mission you're building in the editor. Put the scripts in the folder of the mission you need them for.
The Missions & MPMission folders are there but they're empty apart from the readMe :j: and i've got plenty of missions in progress in the editor. Hidden files are on, but knowing me i'm probably doing something else wrong...
There should be two Arma 2 directories in the my documents folder.
Try looking in: My Documents\Arma 2 Other Profiles\<Your profile name>\Missions
Thats where it stores mine.
Killy_McMurder
Jul 13 2009, 12:35
Ok, i've got the .sqf in the correct mission folder. And the init box for the unit has the correct line in it, but it still says that the script can not be found when i first load and preview the mission... am i just screwed?lol :confused:
F2k Sel
Jul 13 2009, 15:17
May I ask a question, does AI soldier using attachTo command can fire their weapon? if they can how is their accuracy? is it like normal or is it like static weapons? I'm figuring it could be made with a foxhole
I don't see why it would be different your not changing the config of the unit, the only problem I can see is if the old bugs of not being able to shoot over certain objects is still about.
Killy_McMurder
Jul 14 2009, 13:15
Got the c130 script working, finally, Works brilliantly.
Thanks Tajin, done a great job there
Thanks, I'm glad it works for you now. :cool:
doktajimmy
Jul 19 2009, 00:20
Hi,
I've got a bunch of guys to para out of 2 ospreys. The ospreys are spawned with an sqs, as are the troops and waypoints.
Is there any way to get a humvee loaded into a C130 with the same type of script and then when it reaches a scripted waypoint execute the unload function from above or something similar?
Is there any way to make the soilders get ontop of the apc for a moveincargo command so that we can have AI scripted to do it and can it be on any of the russian equiptment??
warpuppy
Jul 21 2009, 22:51
hi there all
I was wondering if anyone could point me/assist me in being able to use the attachto command to load the mortar/ammoboxes into a truck that could transport them around and then unload
Any help would be much appreciated
Many thanks in advance
sqf files go in the same place that the mission does same folder
vengeance1
Jul 26 2009, 03:41
Damn.
Wait, I'll give you the last tested version using two files. I've merged those two files into one, but I couldn't test it at the moment so maybe I have an small bug there somewhere that I didnt notice. However, the 2-file version should work.
http://tajin.evilhosting.de/arma/cargoscript.zip
Init:
[this] execVM "c130cargo.sqf"
I tried getting the Init to work like this but it errors I was able to get it to work like this?
res=[this] execVM "c130cargo.sqf";
Great Script however lots of uses.
F2k Sel
Jul 26 2009, 11:18
hi there all
I was wondering if anyone could point me/assist me in being able to use the attachto command to load the mortar/ammoboxes into a truck that could transport them around and then unload
Any help would be much appreciated
Many thanks in advance
Just name the truck and the ammo
ammo attachto [truck,[0,0,0]]
That will be in the wrong place but see where it appears and just adjust it's position to get it into the right place using different values X,Y,Z in the attacto command.
To detach it's just
detach Ammo place in a trigger or waypoint, To get it off the truck you may need to give it a new position.
cestcomi
Jul 26 2009, 14:41
Hi all,
The script works for me but unfortunately it stopped to work after the first respawn of the c130. :confused:
Tested on "Co_30_EvolutionUSMC_v08.Chernarus".
Any idea ?
Thx :)
(For those how knows this mod, read this (http://www.g-g-c.de/forum/showthread.php?p=112182#post112182) about the bug about the mission stopping in Gorka)
G-Man-853
Jul 28 2009, 17:23
Hi all,
The script works for me but unfortunately it stopped to work after the first respawn of the c130. :confused:
Tested on "Co_30_EvolutionUSMC_v08.Chernarus".
I am having the same problem tested it with "co30_Domination_1_00A2T10_West.Chernarus"
C-130j Initialization:res=[this] execVM "c130cargo.sqf";handle = [this, 120] execVM "x_scripts\x_vehirespawn2.sqf"
cestcomi
Jul 28 2009, 20:25
C130J
_vehicle_21 = objNull;
if (true) then
{
_this = createVehicle ["C130J", [4621.999, 2555.9509], [], 0, "CAN_COLLIDE"];
_vehicle_21 = _this;
_this setDir 121.27563;
_this setVehicleInit "[this] execVM ""C130\C130cargo.sqf"";";
};
MV22
_vehicle_23 = objNull;
if (true) then
{
_this = createVehicle ["MV22", [4648.8774, 2579.8801], [], 0, "CAN_COLLIDE"];
_vehicle_23 = _this;
_this setDir 166.91376;
_this setVehicleInit "[this] execVM ""mv22\mv22cargo.sqf"";";
};
I create 2 directory and renamed the script: one for C130j and one for MV22.
(I made some modifications > C130J can drop Tank but MV22 doesn't.)
It works, but only once :j:
I've posted an respawnscript somewhere on this forum that allows to save an init-line for respawning. That should do the trick.
Otherwise the script would have to be put in a loop and a vehiclevarname will have to be used. Then however you would atleast need an respawnscript that keeps the vehiclevarname.
Cestcomi, about that mv22 version: Did you notice the part in the script where the boundingbox of the object you want to load is checked ? Hope you adjusted that too.
Oh and here's the link for the respawnscript I mentioned: http://forums.bistudio.com/showthread.php?t=79070
Did anyone ever get that aircraft towing tractor to work?
I know a lot of people which sort of needs it for missions so if anyone has it, please post it up.
Hmmm, I guess I could do that. Just not anytime soon.
TenaciousB
Jul 31 2009, 18:38
Hello,
I'm having an issue with the c130 cargo script. It works great when I preview it in the editor, or create an online server and load the map however when i upload it to a dedicated server the cargo script never becomes activated. Do I need to initialize the script somewhere else in the mission file?
Thanks, T
**EDIT** I fixed the problem it was a minor coding problem (BTW the mission was domi)
Hey guys, saw this thread and thought I'd share how I've toyed with attachTo. Very simple, only the second one uses any external scripting, and maybe 6 lines at that (mostly to add a new action).
Chinook CRRC Insertion (http://www.youtube.com/watch?v=jQMempWjw8w)
Chinook CRRC Extraction (http://www.youtube.com/watch?v=IckIart_CuE)
vengeance1
Aug 1 2009, 15:13
Hey guys, saw this thread and thought I'd share how I've toyed with attachTo. Very simple, only the second one uses any external scripting, and maybe 6 lines at that (mostly to add a new action).
Chinook CRRC Insertion (http://www.youtube.com/watch?v=jQMempWjw8w)
Chinook CRRC Extraction (http://www.youtube.com/watch?v=IckIart_CuE)
Could you post the script you used to do this? Way Cool! :)
I actually deleted the files after I was done playing with them :( It's real simple, the first doesn't even use any external scripting. It's just an attachTo and detach when you reach a certain waypoint.
It's harder doing an insertion because you have to try to figure out how to set it right in the cargo area, otherwise when it detaches it'll start bouncing around wildly and *maybe* exit through the back. I think I used [0,-1,-0.5].
For the extraction one... pretty much the same thing, just attach when you're inside. I added scripts just so I could have that "Move to Chinook seat" action. Also, I found that if you're sitting in the cargo space, and the crrc is in there... it'll appear as if it's just outside the ramp for you, which sucks :( It wont look like its inside right next to you even though it is.
vengeance1
Aug 2 2009, 01:22
Thanks for the follow up, I'll give it some work. ;)
cestcomi
Aug 3 2009, 22:01
I've posted an respawnscript somewhere on this forum that allows to save an init-line for respawning. That should do the trick.
Otherwise the script would have to be put in a loop and a vehiclevarname will have to be used. Then however you would atleast need an respawnscript that keeps the vehiclevarname.
Cestcomi, about that mv22 version: Did you notice the part in the script where the boundingbox of the object you want to load is checked ? Hope you adjusted that too.
Oh and here's the link for the respawnscript I mentioned: http://forums.bistudio.com/showthread.php?t=79070
Hi Tajin,
I tried your respawn script and it works. But once again, "cargoscript (http://forums.bistudio.com/showpost.php?p=1305503&postcount=35)" stopped to work after the first respawn.
For information, I have renamed "cargoscript" to "mv22cargo.sqf" and "mv22cargoscript.sqf". I changed both files so that they correspond to the new name and I put everything in the directory "mv22\".
So I tried with this script (Simple Vehicle Respawn Script v1.6 (http://forums.bistudio.com/showthread.php?t=76445&highlight=simple+respawn)) but same result after the first respawn (I had no doubt of the result :rolleyes:).
I give you the trick here if someone could find a solution:
Co_20_EVO_USMC_v095b.Chernarus.zip (http://www.clan-gfds.com/a_divers/Co_20_EVO_USMC_v095b.Chernarus.zip)
I have made some modifications to the following files because the mod has his own system for respawn (I only want to use Simple Vehicle Respawn or something else like Tajin's script):
- data\scripts\sinit.sqf
- data\scripts\EVO_MakeBase.sqf (many vehicles and other stuff are in this file)
- mission.sqm (the others vehicles/stuff and the MV22 are in this file !)
This is what you will find in "missions.sqm" for the first MV22:
class Item363
{
position[]={4621.999,9,2555.9509};
azimut=121.384;
id=442;
side="EMPTY";
vehicle="MV22";
skill=0.60000002;
init="veh = [this, 300, 300, 0, FALSE, FALSE, [this] execVM ""mv22\mv22cargo.sqf""] execVM ""vehicle.sqf"";";
};
I stopped counting the number of test I did :p
But I don't understand why Mando Hitch v1.5 (http://forums.bistudio.com/showthread.php?t=68075&highlight=mando+hitch) works great and not "cargoscript" ?
Principle is really the same, no ?
P.S.: I offer a good Belgian beer at first which finds a solution.
:drinking: ;)
Hi Tajin,
I tried your respawn script and it works. But once again, "cargoscript (http://forums.bistudio.com/showpost.php?p=1305503&postcount=35)" stopped to work after the first respawn.
For information, I have renamed "cargoscript" to "mv22cargo.sqf" and "mv22cargoscript.sqf". I changed both files so that they correspond to the new name and I put everything in the directory "mv22\".
So I tried with this script (Simple Vehicle Respawn Script v1.6 (http://forums.bistudio.com/showthread.php?t=76445&highlight=simple+respawn)) but same result after the first respawn (I had no doubt of the result :rolleyes:).
I give you the trick here if someone could find a solution:
Co_20_EVO_USMC_v095b.Chernarus.zip (http://www.clan-gfds.com/a_divers/Co_20_EVO_USMC_v095b.Chernarus.zip)
I have made some modifications to the following files because the mod has his own system for respawn (I only want to use Simple Vehicle Respawn or something else like Tajin's script):
- data\scripts\sinit.sqf
- data\scripts\EVO_MakeBase.sqf (many vehicles and other stuff are in this file)
- mission.sqm (the others vehicles/stuff and the MV22 are in this file !)
This is what you will find in "missions.sqm" for the first MV22:
class Item363
{
position[]={4621.999,9,2555.9509};
azimut=121.384;
id=442;
side="EMPTY";
vehicle="MV22";
skill=0.60000002;
init="veh = [this, 300, 300, 0, FALSE, FALSE, [this] execVM ""mv22\mv22cargo.sqf""] execVM ""vehicle.sqf"";";
};
I stopped counting the number of test I did :p
But I don't understand why Mando Hitch v1.5 (http://forums.bistudio.com/showthread.php?t=68075&highlight=mando+hitch) works great and not "cargoscript" ?
Principle is really the same, no ?
P.S.: I offer a good Belgian beer at first which finds a solution.
:drinking: ;)
I've got same problem too :(
I've got same problem too :(
I find a solution! Well, I find the problem! xD :D Now need someone who can fix it and give us the solution! The problem is in the "x_vrespawn2.sqf" (<--- in my case this is the respawn script): I think if someone can put the code:
nul = [this] execVM "c130cargo.sqf
in the respawn script when C130 appears it has got the load vehicles script! In this case you must use the "x_vrespawn2.sqf" only for c130 or you can name it "x_vrespawn4c130.sqf" and use it only for c130! :yay:
But I can't understand the "x_vrespawn2.sqf" language :( Some one can help us? :(
This is the "x_vrespawn2.sqf" script:
// by Xeno
private ["_vec_array", "_vehicle", "_number_v", "_kind", "_truck_ammo", "_truck_fuel", "_truck_rep", "_i", "_vec_a", "_disabled", "_type", "_empty", "_hasbox"];
if (!isServer) exitWith{};
#include "x_setup.sqf"
#include "x_macros.sqf"
_vec_array = [];
{
_vehicle = _x select 0;
_number_v = _x select 1;
_kind = _x select 2;
_vec_array = _vec_array + [[_vehicle,_number_v,_kind,position _vehicle,direction _vehicle,typeOf _vehicle]];
_vehicle setVariable ["D_OUT_OF_SPACE", -1];
switch (_kind) do {
case "MR": {
call compile format ["MRR%1=_vehicle;publicVariable ""MRR%1"";", _number_v];
#ifdef __TT__
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];
#endif
};
#ifdef __TT__
case "MRR": {
call compile format ["MRRR%1=_vehicle;publicVariable ""MRRR%1"";", _number_v];
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];
};
#endif
case "TR": {
call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];
_vehicle setAmmoCargo 0;
#ifdef __TT__
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];
#endif
};
#ifdef __TT__
case "TRR": {
call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];
_vehicle setAmmoCargo 0;
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];
};
#endif
case "TTR": {
call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];
_vehicle setAmmoCargo 0;
#ifdef __TT__
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];
#endif
};
#ifdef __TT__
case "TTRR": {
call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];
_vehicle setAmmoCargo 0;
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];
};
#endif
case "TRA": {
call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];
_vehicle setAmmoCargo 0;
#ifdef __TT__
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];
#endif
};
#ifdef __TT__
case "TRAR": {
call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];
_vehicle setAmmoCargo 0;
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];
};
#endif
case "MV": {
MEDVEC = _vehicle; publicVariable "MEDVEC";
#ifdef __TT__
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];
#endif
};
#ifdef __TT__
case "MVR": {
MEDVECR = _vehicle; publicVariable "MEDVECR";
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];
};
#endif
};
} forEach _this;
_this = nil;
_truck_ammo = d_own_trucks select 0;
_truck_fuel = d_own_trucks select 1;
_truck_rep = d_own_trucks select 2;
sleep 65;
while {true} do {
sleep 8 + random 5;
if (X_MP) then {
waitUntil {sleep (1.012 + random 1);(call XPlayersNumber) > 0};
};
__DEBUG_NET("x_vrespawn2.sqf",(call XPlayersNumber))
for "_i" from 0 to (count _vec_array - 1) do {
_vec_a = _vec_array select _i;
_vehicle = _vec_a select 0;
_kind = _vec_a select 2;
_disabled = false;
if (damage _vehicle > 0.9) then {
_disabled = true;
} else {
if (_kind == "TR") then {
switch (_type) do {
case _truck_ammo: {
_vehicle setAmmoCargo 1;
};
case _truck_fuel: {
_vehicle setFuelCargo 1;
};
case _truck_rep: {
_vehicle setRepairCargo 1;
};
};
};
};
if (_vehicle call XOutOfBounds) then {
_outb = _vehicle getVariable "D_OUT_OF_SPACE";
if (_outb != -1) then {
if (time > _outb) then {_disabled = true};
} else {
_vehicle setVariable ["D_OUT_OF_SPACE", time + 600];
};
} else {
_vehicle setVariable ["D_OUT_OF_SPACE", -1];
};
sleep 0.01;
_empty = (if (({alive _x} count (crew _vehicle)) > 0) then {false} else {true});
if ((_disabled && _empty) || (_empty && !(alive _vehicle))) then {
_hasbox = _vehicle getVariable "d_ammobox";
if (isNil "_hasbox") then {
_hasbox = false;
};
if (_hasbox) then {
ammo_boxes = ammo_boxes - 1;
X_JIPH setVariable ["ammo_boxes",ammo_boxes,true];
["ammo_boxes",ammo_boxes] call XSendNetVarClient;
};
sleep 0.1;
deletevehicle _vehicle;
sleep 0.5;
_vehicle = objNull;
_vehicle = (_vec_a select 5) createvehicle (_vec_a select 3);
_vehicle setpos (_vec_a select 3);
_vehicle setdir (_vec_a select 4);
_vec_a set [0, _vehicle];
_vehicle setVariable ["D_OUT_OF_SPACE",-1];
_number_v = _vec_a select 1;
switch (_kind) do {
case "MR": {
call compile format ["MRR%1=_vehicle;publicVariable ""MRR%1"";", _number_v];
if (X_SPE) then {
_vehicle addAction ["MHQ Menu","x_scripts\x_vecdialog.sqf",[],-1,false];
_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkdriver.sqf";}];
};
#ifdef __TT__
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];
#endif
};
#ifdef __TT__
case "MRR": {
call compile format ["MRRR%1=_vehicle;publicVariable ""MRRR%1"";", _number_v];
if (X_SPE) then {
_vehicle addAction ["MHQ Menu","x_scripts\x_vecdialog.sqf",[],-1,false];
_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkdriver.sqf";}];
};
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];
};
#endif
case "TR": {
call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];
_vehicle setAmmoCargo 0;
#ifdef __TT__
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];
if (X_SPE) then {
_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];
};
#endif
};
#ifdef __TT__
case "TRR": {
call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];
_vehicle setAmmoCargo 0;
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];
if (X_SPE) then {
_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];
};
};
#endif
case "TTR": {
call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];
_vehicle setAmmoCargo 0;
#ifdef __TT__
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];
#endif
if (X_SPE) then {
if (__AIVer || str(player) in d_is_engineer) then {
_vehicle addAction["Load Static","scripts\load_static.sqf",[],-1,false];
_vehicle addAction["Unload Static","scripts\unload_static.sqf",[],-1,false];
};
_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checktrucktrans.sqf";}];
};
};
#ifdef __TT__
case "TTRR": {
call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];
_vehicle setAmmoCargo 0;
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];
if (X_SPE) then {
if (__AIVer || str(player) in d_is_engineer) then {
_vehicle addAction["Load Static","scripts\load_static.sqf",[],-1,false];
_vehicle addAction["Unload Static","scripts\unload_static.sqf",[],-1,false];
};
_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checktrucktrans.sqf";}];
};
};
#endif
case "TRA": {
call compile format ["TR%1=_vehicle;publicVariable ""TR%1"";", _number_v];
_vehicle setAmmoCargo 0;
#ifdef __TT__
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];
if (X_SPE) then {
_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];
};
#endif
};
#ifdef __TT__
case "TRAR": {
call compile format ["TRR%1=_vehicle;publicVariable ""TRR%1"";", _number_v];
_vehicle setAmmoCargo 0;
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];
if (X_SPE) then {
_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];
};
};
#endif
case "MV": {
MEDVEC = _vehicle; publicVariable "MEDVEC";
#ifdef __TT__
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillwest.sqf";}];
if (X_SPE) then {
_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];
};
#endif
};
#ifdef __TT__
case "MVR": {
MEDVECR = _vehicle; publicVariable "MEDVECR";
_vehicle addeventhandler ["killed", {_this execVM "x_scripts\x_checkveckillracs.sqf";}];
if (X_SPE) then {
_vehicle addeventhandler ["getin", {_this execVM "x_scripts\x_checkenterer.sqf";}];
};
};
#endif
};
};
sleep 8 + random 5;
};
};
MonsterXXX
Aug 8 2009, 01:49
I was playing around with a way to launch landing craft from the LHD. This is just a test version exploring possibilities. It doesn't support AI. I presume this rig is meant for some sort of boat hoisting.
Download test mission: LHD_BoatLaunch.utes.pbo (http://dump.no/files/297990cb8fba/LHD_BoatLaunch.utes.pbo)
To use:
- there's an action on the towing tractor to teleport to the boat launch platform (since there are no stairs).
- turn on the boat engine to launch the boat into the water
- turn off the boat engine to lift the boat back into the hoisting rig while under it
- use 'get out' to get back on platform
- then use action on the warning signs to teleport to deck (the signs also prevent you from slipping off the launch platform)
Design hurdles and findings:
- it seems you can't use the LHD to attach the boat since the boat keeps dropping every 1 second as if the attach is not checking it regularly enough. Therefore I used the towing tractor for all attach and teleport actions.
- facing the boat at 180 make the default getin/getout actions work better without falling in water
- It's a shame the rear LHD dock doors are closed. It would have been better just to leave them open, since the water is already usable inside the bay. Hope they improve that.
I was put this scripts in Xneo's "The longest day" mission. But I can't play with it, when I go to platform it show two boats on there, and I can't see anything in actionmanu.
I put "nul=[] execVM "Mission\BoatLaunch\LHD_Init.sqf";" in the missions init.sqf is it correct? Can you tell how to solution this problem?
http://i311.photobucket.com/albums/kk453/USEC_Lonewolf/arma22009-08-0809-21-13-03.jpg
> 100kb
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";
cestcomi
Aug 16 2009, 17:11
Thx Norrin !
Works great.
You can make a 360° very quickly with the plane at the rear of the tractor
:D
gnarly_rider
Sep 6 2009, 07:05
Simple beginners question, I'm using Norrins attach mount_vcl_init.sqf scripts etc successfully to load and unload ammo crates.
But, how do I configure these scripts/vehicle init line so vehicle is preloaded with ammo crate at mission start (AAV's conducting amphibious assualt)???
I was put this scripts in Xneo's "The longest day" mission. But I can't play with it, when I go to platform it show two boats on there, and I can't see anything in actionmanu.
I put "nul=[] execVM "Mission\BoatLaunch\LHD_Init.sqf";" in the missions init.sqf is it correct? Can you tell how to solution this problem?
http://i311.photobucket.com/albums/kk453/USEC_Lonewolf/arma22009-08-0809-21-13-03.jpg
> 100kb
That's what I did with mission I'm working on and it works. I'm not sure why it's making 2 boats for you. Maybe a conflict with another script? I also Extracted the .pbo and put the .sqf's in my directory since I had to modify it to be playable. I disabled the "getout" portion so you could actually leave the boat without being ported back to the ship. The only other problem I have is if you turn off the engine and back on again you get ported back to the hoist no matter where you are. I think it's not supposed to if you're more than 30 ft away but it still does.
Can anyone tell me how to fix that?
// Desc: "engine" on/off event handler
//-----------------------------------------------------------------------------
_boat = _this select 0;
_engineOn = _this select 1;
//player sidechat str _this;
if (_engineOn) then
{
for [{_i = -6}, {_i >= -10 /*&& (engineOn _boat)*/}, {_i = _i - 0.1}] do
{
_boat attachTo [ICE_USS_Khe_Sanh_BoatLaunch, [-3.8, 0.4, _i]];
_boat setDir 180; // must be 180, or getOut will jump in water
sleep 0.025;
};
detach _boat;
}
else
{
// find 2d distance
_pos1 = getPos _boat;
_pos2 = getPos ICE_USS_Khe_Sanh_BoatLaunch;
_pos1 set [2, 0];
_pos2 set [2, 0];
_dist2D = _pos1 distance _pos2;
if (_dist2D < 8) then
{
hint "Lifting boat";
for [{_i = -12}, {_i <= -6 /*&& (!engineOn _boat)*/}, {_i = _i + 0.1}] do
{
_boat attachTo [ICE_USS_Khe_Sanh_BoatLaunch, [-3.8, 0.4, _i]];
_boat setDir 180; // must be 180, or getOut will jump in water
sleep 0.05;
};
/* optional
sleep 2;
doGetOut player;
[objNull, player, -1] execVM "Mission\BoatLaunch\LHD_MoveToPlatform.sqf";
*/
}
else
{
if (_dist2D < 30) then
{
hint format["Too far from lifter: %1m", round _dist2D];
};
};
};
gnarly_rider
Sep 9 2009, 06:55
Simple beginners question, I'm using Norrins attach mount_vcl_init.sqf scripts etc successfully to load and unload ammo crates.
But, how do I configure these scripts/vehicle init line so vehicle is preloaded with ammo crate at mission start (AAV's conducting amphibious assualt)???
OK a little update on my question.
I put this in my ammo box init line where AAV1 is the name of the destination vehicle.
this attachTo [AAV1,[0,0,0.5]];
This works well: the ammo crate is definitley with the vehicle when I drive it around. However Norrins script doesn't recognize it as loaded, just its proximity. So after driving it somewhere after initial mission start, I get out, and have to 'Load' the box first, prior to 'unloading' it.
Any thoughts what I need to tinker with to get the Load thing initialised?
Can't seem to get setting the variable to work right due to how the script works (it defaults to clearing it right away.
However, to make the crate look better on the AAV, use this:
this attachTo [AAV1,[.33,-1.5,1.2]];
Now, to make the SCRIPT put it there, try something like this in mount_vcl.sqf:
_loc = switch (typeOf _vcl) do {
case "LAV25_HQ": {[.5,-1.5,.9]}; // LAVHQ
case "hilux1_civil_1_open": {[0.3,-1.5,0.3]}; // pickup
case "BMP2_HQ_CDF": {[0.3,-2.3,-2.8]}; // BMPHQ
case "AAV": {[.33,-1.5,1.2]}; // AAV
default {[0.3,-1.5,0.3]};
};
_mountVcl attachTo [_vcl,_loc];
instead of the normal _mountVcl attachTo [_vcl, [0.3,-1.5,0.3]]; line.
gnarly_rider
Sep 9 2009, 07:51
Can't seem to get setting the variable to work right due to how the script works (it defaults to clearing it right away.
Cool, I've been fiddling for awhile too, and still no luck!
However, to make the crate look better on the AAV, use this:
this attachTo [AAV1,[.33,-1.5,1.2]];
Now, to make the SCRIPT put it there, try something like this in mount_vcl.sqf:
_loc = switch (typeOf _vcl) do {
case "LAV25_HQ": {[.5,-1.5,.9]}; // LAVHQ
case "hilux1_civil_1_open": {[0.3,-1.5,0.3]}; // pickup
case "BMP2_HQ_CDF": {[0.3,-2.3,-2.8]}; // BMPHQ
case "AAV": {[.33,-1.5,1.2]}; // AAV
default {[0.3,-1.5,0.3]};
};
_mountVcl attachTo [_vcl,_loc];
instead of the normal _mountVcl attachTo [_vcl, [0.3,-1.5,0.3]]; line.
Works a treat cheers!!!
gnarly_rider
Sep 9 2009, 12:09
Problem has been solved by some great work from ZSU Victim, cheers!
Problem has been solved by some great work from ZSU Victim, cheers!
Can you post what you did to fix it please?
Newb question - Can the heli door script be adapted to have passenger in say a Littlebird shoot their weapons? so rather than "move" to door the player stays in the seated position? Guess the animation for kneeling etc.. probably prevents this??
Anyway - as always amazed and appreciative of the amazing work the community does with these addons
cheers
I have an issue with the heliDoor script, perhaps I'm doing something wrong. I just tested it out with an AI pilot hovering in place and then myself getting to the door positiion. As soon as I get to it, he starts moving again, like in a circle, rather than staying still. Any ideas?
gnarly_rider
Sep 14 2009, 08:03
Simple beginners question, I'm using Norrins attach mount_vcl_init.sqf scripts etc successfully to load and unload ammo crates.
But, how do I configure these scripts/vehicle init line so vehicle is preloaded with ammo crate at mission start (AAV's conducting amphibious assualt)???
OK solution provied by ZSU Victim, as below:
"create a new file in the mountonvcl subdirectory called automount_vcl.sqf:"
// automount_vcl.sqf
// © SEP 2009 - Victim (scgadsl@<hidden>)
// based on original work © JUNE 2009 - norrin (norrin@<hidden>)
_vcl = _this select 0;
_typeOfVcl = _this select 1;
_mountVcl = objNull;
_mountVcl = nearestObjects [_vcl, [_typeOfVcl], 20] select 0;
_mountVcl attachTo [_vcl,[0.3,-1.5,0.3]];
sleep 0.1;
_vcl setVariable ["NORRN_mountOn_vcl_pos0", [true, _mountVcl], true];
if (true) exitWith {};
"Then edit the mount_vcl_init.sqf and add the following lines in BOLD RED"
// mount_vcl_init.sqf
// © JUNE 2009 - norrin (norrin@<hidden>)
/*
Name playable units and vehicle in the editor
Put this in the init line of the vehicle in the editor: nul = [this] execVM "mountOnVcl\mount_vcl_init.sqf";
*/
_vcl = _this select 0;
_typeOfVcl = _this select 1;
_automount = _this select 2;
_c = 1;
_load = _vcl addAction ["Load bike on truck", "mountOnVcl\mount_vcl.sqf", _typeOfVcl, 0, false, true];
_unload = _vcl addAction ["Unload vehicle", "mountOnVcl\dismount_vcl.sqf","", 0, false, true];
_toAttach = objNull;
_vcl removeAction _load;
_vcl removeAction _unload;
if (isServer) then
{
_vcl setVariable ["NORRN_mountOn_vcl_pos0", [false, objNull], true];
sleep 2;
if (_automount) then
{
//hint "Attempting to Automount...";
nul = [_vcl,_typeofVcl] ExecVM "mountOnVcl\automount_vcl.sqf";
};
};
while {alive _vcl} do
"Finally change your vehicle init line from this:
nul = [this,"bicycle"] execVM "mountOnVcl\mount_vcl_init.sqf";
to this:
nul = [this,"bicycle",true] execVM "mountOnVcl\mount_vcl_init.sqf";
if you don't want it to automount then use this:
nul = [this,"bicycle",false] execVM "mountOnVcl\mount_vcl_init.sqf"; "
I was put this scripts in Xneo's "The longest day" mission. But I can't play with it, when I go to platform it show two boats on there, and I can't see anything in actionmanu.
I put "nul=[] execVM "Mission\BoatLaunch\LHD_Init.sqf";" in the missions init.sqf is it correct? Can you tell how to solution this problem?
It's an issue with the script not being dedicated server friendly. If anyone could make the adjustments so that this works in MP I for one would be grateful! :239::notworthy:
Helepolis989
Sep 22 2009, 02:29
OK solution provied by ZSU Victim, as below:
"create a new file in the mountonvcl subdirectory called automount_vcl.sqf:"
"Then edit the mount_vcl_init.sqf and add the following lines in BOLD RED"
"Finally change your vehicle init line from this:
nul = [this,"bicycle"] execVM "mountOnVcl\mount_vcl_init.sqf";
to this:
nul = [this,"bicycle",true] execVM "mountOnVcl\mount_vcl_init.sqf";
if you don't want it to automount then use this:
nul = [this,"bicycle",false] execVM "mountOnVcl\mount_vcl_init.sqf"; "
Im sorry but this is probably gonna be a dumb question, i am very new to scripting and i am having a tough time reading and learning it. This will allow you to pick up a ammo crate and drop it off? Will it work for a uh-y1 or is it only for a plane. Is there one for a uh-y1 and if there is, is there a way to drop the crate from really high so it can parachute down, or is that how it already works?
kylania
Sep 22 2009, 02:54
That script will work for basically any item with any vehicle, it just won't always look good.
It won't drop it via parachute. That requires a lot more scripting, and there's plenty of examples on that you can search for.
If you want quick and dirty air drop try this:
http://forums.bistudio.com/showpost.php?p=1407187&postcount=12
Helepolis989
Sep 22 2009, 03:04
But the script will let me pick up an ammo crate from a heli, and take it over to my friends that are encircled by enemies and low on ammo and drop it off to them fully filled?
kylania
Sep 22 2009, 03:22
it should, yes
Helepolis989
Sep 22 2009, 03:47
"create a new file in the mountonvcl subdirectory called automount_vcl.sqf:"
Man i just must be stupid...where do i find the mountonvd at... or do i even need it. and how does this script know what vehicle is needed to attach the ammo crates? Sorry you can obviously tell i am new at this because i am just so lost.
gnarly_rider
Sep 28 2009, 08:22
Helopolis, start reading this thread at the very first post by Norrin.
PeterEyres
Sep 28 2009, 13:33
get an issue with choppers taking damage in midair when attaching ammocrates to them, anyone else?
gnarly_rider
Oct 1 2009, 09:03
We have a little induction mission we run for new players to our group weekly, so I thought I'd give the regular induction trainer staff a bit of a shock.... (yes this in on topic...) ;D
http://www.youtube.com/watch?v=nh08U4CwyVM
blakeace
Oct 16 2009, 04:29
Ok I must admit I love Norrins little attachto scripts. I have altered and played around with the bike on the pickup one to acomplish all sorts of things like carrying ammo crates, mortars, adding searchlights to the back of trucks the list goes on!
Here is one thing that I am sure some people will love. I have always wanted to be able to tow the M119 around before a truck. Now this doesn't do anything fancy it just attaches the gun to the back of the truck, so the wheels don't rotate and the base plate is still present, though partially hidden most of the time. At least it gives me the ability to add this to the missions if I need to relocate etc.
http://img517.imageshack.us/img517/9230/towgun.jpg
// mount_vcl.sqf
// © JUNE 2009 - norrin (norrin@<hidden>)
_vcl = _this select 0;
_caller = _this select 1;
_typeOfVcl = _this select 3;
_dir = getdir _vcl;
_mountVcl = objNull;
_blogs = 0;
_c = 0;
_dir1 = 0;
if (count nearestObjects [player, [_typeOfVcl], 20] > 0) then
{
_mountVcl = nearestObjects [player, [_typeOfVcl], 20] select 0;
};
if (vehicle _caller != _caller) then {_caller action ["GetOut", vehicle _caller]; sleep 1};
if (!((_vcl getVariable "NORRN_mountOn_vcl_pos1") select 0)) then
{
_dir1 = getdir _vcl;
_vcl setdir 0;
_mountVcl attachTo [_vcl,[0,-6.4,-1.2]];
_mountVcl setDir 180;
_mountVcl setVectorup [0,-0.15,1];
_vcl setdir _dir1;
sleep 0.1;
_vcl setVariable ["NORRN_mountOn_vcl_pos1", [true, _mountVcl], true];
};
if (true) exitWith {};
So all I have done is added bits to the mount_vcl.sqf script. Then in the init line of the truck assigned the type of object to be attached to M119
nul = [this,"M119"] execVM "mountOnVcl\mount_vcl_init.sqf";
The rest of the scripts are as per Norrins Put bike in Pickup scripts.
As always love your work Norrin!
This has not been tested in MP, just been playing around, and their is probably a better way of doing it, but it may just give a little enjoyment to others like it has to me.
Is there a way to make the hinge work? Or at least limit turning radius of the vehicle to simulate the extra weight and friction when turning sharply. Using the tow tractor on the C130 lets you do donuts and knock everything in your path over.
blakeace
Oct 16 2009, 04:54
Is there a way to make the hinge work? Or at least limit turning radius of the vehicle to simulate the extra weight and friction when turning sharply. Using the tow tractor on the C130 lets you do donuts and knock everything in your path over.
Not without a lot of work. Regarding the turning circle it is not as noticable, the example you give is the worst case scenerio using the vehicle with the smallest turning circle attached to the longest model towed. Though trying to turn the C130 without it is even more fun!
I will take the limitations for the benefits.
Damn guys help. I do what it said but i can't get any of them to work. Maybe i am doing something wrong. Any advice?
---------- Post added at 10:47 PM ---------- Previous post was at 10:31 PM ----------
oh nevermind
IceBreakr
Nov 13 2009, 11:47
blakeace: your script works nice, but on dedicated the gun is turned in the opposite way when you load it. See:
http://www.vojak.si/photos/vitalfist1.jpg
In SP and hosted game it works nicely.
blakeace
Nov 18 2009, 07:02
blakeace: your script works nice, but on dedicated the gun is turned in the opposite way when you load it. See:
http://www.vojak.si/photos/vitalfist1.jpg
In SP and hosted game it works nicely.
Not sure about this one mate, have to admit I am far from a dedicated server expert. I can only confirm it is doing the same thing on our server. Sometimes it would set the correct angle in relation to the truck, but would always fail to angle correctly to set the connection point correctly.
Wish I could be of more help, but this will have to wait for someone who is more familiar with dedicated servers.
IceBreakr
Nov 26 2009, 12:35
Blakeace: tnx for reply.
Something stays local instead of being a public variable... guys any clues?
Instead of:
gun setdir 123;
Do:
gun setvehicleinit "this setdir 123";
processinitcommands;
Edit: Yes, I know wiki says the setdir should sync, but doesn't work for me either.
blakeace
Dec 6 2009, 12:08
Instead of:
gun setdir 123;
Do:
gun setvehicleinit "this setdir 123";
processinitcommands;
Edit: Yes, I know wiki says the setdir should sync, but doesn't work for me either.
Thanks shk, that was the right path to fix this. I have got it to work on our dedicated server, though sometimes the whole rig points north when loading.
But the Gun always loads right and unloads flat. Might look funny on steep inclines didn't test to be honest.
I usually slightly raise the gun barrel before loading to make it look better.
// mount_vcl_init.sqf
// © JUNE 2009 - norrin (norrin@<hidden>)
/*
Name playable units and vehicle in the editor
Put this in the init line of the vehicle in the editor: nul = [this] execVM "mountOnVcl\mount_vcl_init.sqf";
*/
_vcl = _this select 0;
_typeOfVcl = _this select 1;
_c = 0;
_load = _vcl addAction ["Load bike on truck", "TankTow\mount_vcl.sqf", _typeOfVcl, 0, false, true];
_unload = _vcl addAction ["Unload vehicle", "TankTow\dismount_vcl.sqf","", 0, false, true];
_toAttach = objNull;
_vcl removeAction _load;
_vcl removeAction _unload;
if (isServer) then
{
_vcl setVariable ["NORRN_mountOn_vcl_pos1", [false, _toAttach], true];
sleep 2;
};
while {alive _vcl} do
{
if (!((_vcl getVariable "NORRN_mountOn_vcl_pos1") select 0) && _c == 0 && count (nearestObjects [_vcl, ["man"], 10]) > 0 && count (nearestObjects [_vcl, [_typeOfVcl], 10]) > 0) then
{
_load = _vcl addAction ["Attach Gun", "TankTow\mount_vcl.sqf", _typeOfVcl, 0, false, true];
_vcl removeAction _unload;
_c = 1;
};
if (((_vcl getVariable "NORRN_mountOn_vcl_pos1") select 0) && _c == 1) then
{
_unload = _vcl addAction ["Release Gun", "TankTow\dismount_vcl.sqf","", 0, false, true];
_vcl removeAction _load;
_c = 0;
};
if (count (nearestObjects [_vcl, ["man"], 10]) == 0 || count (nearestObjects [_vcl, [_typeOfVcl], 10]) == 0) then
{
_vcl removeAction _load;
_vcl removeAction _unload;
if (!((_vcl getVariable "NORRN_mountOn_vcl_pos1") select 0)) then {_c = 0};
if ((_vcl getVariable "NORRN_mountOn_vcl_pos1") select 0) then {_c = 1};
};
//hint format ["%1", (_vcl getVariable "NORRN_mountOn_vcl_pos1")];
sleep 0.5;
/*
if(speed _vcl >= 20 and _c == 1 ) then
{
_vel = velocity _vcl;_dir = direction _vcl;
_speed =5.3; comment "Added speed";
_vcl setVelocity [(sin _dir*_speed),(cos _dir*_speed),(_vel select 2)];
};
*/
};
if (!alive _vcl) exitWith {};
// mount_vcl.sqf
// © JUNE 2009 - norrin (norrin@<hidden>)
_vcl = _this select 0;
_caller = _this select 1;
_typeOfVcl = _this select 3;
_dir = getdir _vcl;
_mountVcl = objNull;
_blogs = 0;
_c = 0;
globaldir1 = 0;
if (count nearestObjects [player, [_typeOfVcl], 20] > 0) then
{
_mountVcl = nearestObjects [player, [_typeOfVcl], 20] select 0;
};
if (vehicle _caller != _caller) then {_caller action ["GetOut", vehicle _caller]; sleep 1};
if (!((_vcl getVariable "NORRN_mountOn_vcl_pos1") select 0)) then
{
globaldir1 = getdir _vcl;
_vcl setvehicleinit "this setdir 0;";
processinitcommands;
_mountVcl attachTo [_vcl,[0,-6.4,-1.2]];
_mountVcl setvehicleinit "this setDir 180; this setVectorup [0,-0.15,1];";
processinitcommands;
_vcl setvehicleinit "this setdir globaldir1;";
processinitcommands;
sleep 0.1;
_vcl setVariable ["NORRN_mountOn_vcl_pos1", [true, _mountVcl], true];
};
if (true) exitWith {};
// dismount_vcl.sqf
// © JUNE 2009 - norrin (norrin@<hidden>)
_vcl = _this select 0;
_caller = _this select 1;
_mountVcl = (_vcl getVariable "NORRN_mountOn_vcl_pos1") select 1;
_vclDir = getDir _vcl;
if (vehicle player == player) then
{
detach _mountVcl;
_mountVcl setvehicleinit "this setDir 180; this setVectorup [0,0,0];";
processinitcommands;
_vcl setVariable ["NORRN_mountOn_vcl_pos1", [false, objNull], true];
};
if (true) exitWith {};
pineapple-yetti
Dec 12 2009, 21:23
Hey as a rabid revive user i love the work you do norrin. took a look at your move to door heli script last night and its fantastic! As there are a few Gereration Kill fans in ZSU the clan i belong to. i decided to see what would happen if i put your attachto on a hummer or a CRRCs. had an intresting eftect. it works except for druing speed, i guess this is something to do with valocity in your script. as im a noob when it comes to scripting and volcity im not gonna touch that with 50 foot barge pole!:eek: would love if someone could take a look and tell me what they think.Atttach to hummer (http://www.zspecialunit.org/forums/attachments/arma-2-armed-assault-2/209d1260623763-crc-patrols-mount-hummer.rar)
Antonkr
Dec 24 2009, 17:14
Ok I must admit I love Norrins little attachto scripts. I have altered and played around with the bike on the pickup one to acomplish all sorts of things like carrying ammo crates, mortars, adding searchlights to the back of trucks the list goes on!
Here is one thing that I am sure some people will love. I have always wanted to be able to tow the M119 around before a truck. Now this doesn't do anything fancy it just attaches the gun to the back of the truck, so the wheels don't rotate and the base plate is still present, though partially hidden most of the time. At least it gives me the ability to add this to the missions if I need to relocate etc.
http://img517.imageshack.us/img517/9230/towgun.jpg
// mount_vcl.sqf
// © JUNE 2009 - norrin (norrin@<hidden>)
_vcl = _this select 0;
_caller = _this select 1;
_typeOfVcl = _this select 3;
_dir = getdir _vcl;
_mountVcl = objNull;
_blogs = 0;
_c = 0;
_dir1 = 0;
if (count nearestObjects [player, [_typeOfVcl], 20] > 0) then
{
_mountVcl = nearestObjects [player, [_typeOfVcl], 20] select 0;
};
if (vehicle _caller != _caller) then {_caller action ["GetOut", vehicle _caller]; sleep 1};
if (!((_vcl getVariable "NORRN_mountOn_vcl_pos1") select 0)) then
{
_dir1 = getdir _vcl;
_vcl setdir 0;
_mountVcl attachTo [_vcl,[0,-6.4,-1.2]];
_mountVcl setDir 180;
_mountVcl setVectorup [0,-0.15,1];
_vcl setdir _dir1;
sleep 0.1;
_vcl setVariable ["NORRN_mountOn_vcl_pos1", [true, _mountVcl], true];
};
if (true) exitWith {};
So all I have done is added bits to the mount_vcl.sqf script. Then in the init line of the truck assigned the type of object to be attached to M119
nul = [this,"M119"] execVM "mountOnVcl\mount_vcl_init.sqf";
The rest of the scripts are as per Norrins Put bike in Pickup scripts.
As always love your work Norrin!
This has not been tested in MP, just been playing around, and their is probably a better way of doing it, but it may just give a little enjoyment to others like it has to me.
About norrins script. How to change what can be added?
Major Woody
Dec 28 2009, 07:27
Love this script - I've been playing around with the pick-up truck and the bike for quite a while now
http://norrin.org/images/ArmA2/mountedBike.jpg
(I've been using trucks'n mortars instead though ;))
Then I've tried to make some additional script in order to carry 3 tubes pr. truck instead of just one. I do get 3 "Load Mortar" options, but once I've loaded one Mortar I suddenly get 3 "Unload Mortar" options... ?!?
How can I load several items in one vehicle and how do I unload them next to eachother instead of at the same spot...? :)
blakeace
Dec 29 2009, 05:23
About norrins script. How to change what can be added?
nul = [this,"M119"] execVM "mountOnVcl\mount_vcl_init.sqf";
By the variables passed.
In this case the script command is place in the vehicles init line. So "this" is refering to that particular vehicle, the second parameter is what the script looks for to carry.
Note different objects have different positional requirements meaning you would have to adjust the attachto offset in the mount script.
Then I've tried to make some additional script in order to carry 3 tubes pr. truck instead of just one. I do get 3 "Load Mortar" options, but once I've loaded one Mortar I suddenly get 3 "Unload Mortar" options... ?!?
How can I load several items in one vehicle and how do I unload them next to eachother instead of at the same spot...? :)
I looked at this a while ago, but can't find the scripts atm. If I remeber Norrin uses a variable to save the current state of the script.
_vcl setVariable ["NORRN_mountOn_vcl_pos0", [false, _toAttach], true];
I believe this was it. My "bandaid solution was to create a second script, where I changed NORRN_mountOn_vcl_pos0 to NORRN_mountOn_vcl_pos1 in the second script. Not very elegant but created two positions on a truck.
Though I am going by memory here so could be off the mark!
shadowhunter388
Dec 30 2009, 07:35
Please I need help. Where do I place the script for the C-130 do I place it along with the mission sqm. in C:\Users\Owner\Documents\ArmA 2 Other Profiles\shadowhunter388\missions\? When I go to load it it says. Cannot find script eject sqs.. I cant fiqure out how to get it to work. Please if you can reply and help me. thanks ;)
---------- Post added at 08:35 AM ---------- Previous post was at 08:06 AM ----------
Yeah I need help are you supposed to put the mission.sqm and the script sqf in C:\Users\Owner\Documents\ArmA 2 Other Profiles\shadowhunter388\missions? if so when I load the misson it says script scripts/eject1.sqf is not found.
blakeace
Dec 31 2009, 00:43
Please I need help. Where do I place the script for the C-130 do I place it along with the mission sqm. in C:\Users\Owner\Documents\ArmA 2 Other Profiles\shadowhunter388\missions\? When I go to load it it says. Cannot find script eject sqs.. I cant fiqure out how to get it to work. Please if you can reply and help me. thanks ;)
---------- Post added at 08:35 AM ---------- Previous post was at 08:06 AM ----------
Yeah I need help are you supposed to put the mission.sqm and the script sqf in C:\Users\Owner\Documents\ArmA 2 Other Profiles\shadowhunter388\missions? if so when I load the misson it says script scripts/eject1.sqf is not found.
If you are refering to Norrins script from http://forums.bistudio.com/showthread.php?t=73630&page=2 then the scripts are to be located in a sub directory of the mission directory.
Directory Name = mountOnC130
nul = [this,"car"] execVM "mountOnC130\mount_vcl_init.sqf";
As you can see from the call to the script above.
Major Woody
Jan 14 2010, 09:46
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...?
blakeace
Jan 15 2010, 12:11
I haven't played with these for a while, but I think the * cos component dictates the side to side. If I am wrong, which wouldn't be hard concidering how tired I am at the moment! Have you tried using the modeltoworld command?
http://community.bistudio.com/wiki/modelToWorld
Major Woody
Jan 30 2010, 12:17
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];
team0america
Feb 22 2010, 09:19
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?
blakeace
Feb 23 2010, 23:04
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.
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
Fanatic72
Mar 9 2010, 10:32
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?
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
blacki999
Apr 20 2010, 23:12
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 (http://tajin.evilhosting.de/arma/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?
gunterlund21
Jun 4 2010, 00:22
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?
@<hidden> 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.
ker8er0s
Oct 31 2010, 18:17
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
ThaRealDeal15
Nov 13 2010, 05:39
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
R.Flagg
Feb 28 2011, 00:53
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.
Can we have any hope that the scripts will be reuploaded or the site will be back online?
nexusmax
Aug 13 2012, 18:29
Does anyone know where to find these now?
Foxhound
Aug 13 2012, 18:39
Most of these you can find on Armaholic, for example the tow script:
http://www.armaholic.com/page.php?id=7073&highlight=NORRIN%2BTOW%2BAIRCRAFT
Do a search for whatever you need.
Odyseus
Sep 23 2012, 17:33
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
WackyIraqi
Oct 8 2012, 16:52
Most of these you can find on Armaholic, for example the tow script:
http://www.armaholic.com/page.php?id=7073&highlight=NORRIN%2BTOW%2BAIRCRAFT
Do a search for whatever you need.
I believe he is looking for version 3 of the heli script which doesn't have the bug where input gets disabled.
I, too, am looking for it.
sgthalo1
Nov 4 2012, 02:37
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?
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.