PDA

View Full Version : attachto nearest.



Kocrachon
Jun 3 2009, 00:47
So right now I am trying to come up with a script where a group of AAVs are slowly driving along side some players. I want to make it to where the players can jump on and ride the top.

So my question is, what script would work best. A script where it detects when a player is near a APC it gives them the option to jump on top. Or a script where when a player is near an apc, the APC itself has the option to jump on top?

norrin
Jun 3 2009, 00:58
Mike84 in another thread has found a built in AAV that allows you to ride on the top of. It called "aav_cutscene" and it can be added to a mission using the createVehicle command.

see: http://forums.bistudio.com/showthread.php?t=73387

It may be all you need, if not later in the thread there's a discussion on doing exactly what you're suggesting using the attachTo command that may help.

Also possibly look here for more info on using attachTo in vehicles: http://forums.bistudio.com/showthread.php?t=73483

Kocrachon
Jun 3 2009, 01:50
Well that does help a bit.

The only other question though is if I wanted to do it on tanks also. Because I want it to be where they dont get on just ONE of the apcs/tanks, but they can get on what ever one they are standing by. Say they decide the area is clear, just walk to the nearest abrams and hop onto it, or wait unti the end of the convoy and jump on the jast AAV.

norrin
Jun 3 2009, 02:39
I can send you some scripts later that you maybe able to adapt to your situation. In them I've just added the action to the vehicle.

this addAction ["Sit on top of APC", "sitOnTopVcl\mount_apc.sqf"]; so when a player gets near a vehicle he gets the option to sit on top of it.

The only problem I have is that so far I haven't been able to add an action to the player once its attached so there's no way he can get down again. If I can get this sorted then the system should be applicable to just about any vehicle. All you'll need to do is work out the animation you want the units to take and the placement on the vehicle.

CarlGustaffa
Jun 3 2009, 10:31
Automatic if driver gets out or is killed and vehicle has below a certain speed?

The no reload and firemode ability seems quite restrictive though.