OFPEC Forum

Addons & Mods Depot => Arma2 - O2 and Models/Modelling => Topic started by: DaKa on 25 Dec 2012, 22:16:38

Title: Moving inside a moving vehicle
Post by: DaKa on 25 Dec 2012, 22:16:38
Hello!

First off, I'm not sure if I posted this in the correct section, because I believe this includes Modelling and Model-scripts. If I posted this in the wrong place, let me know, and I'll re-create this where it should belong.

I've an add-on project in mind, in which a player would be able to move inside a moving, working plane/vehicle's cargo hold (ex. C-130). Before I put up more questions, I would like to ask those who have an understanding of the ArmA2 engine, that is this possible? Does the engine limit this kind of a project. Because (if I understand correctly) of a moving object (for example a rotor) is able to be attached to another object, by that logic, a player should be able to move, in a moving vehicle (memory points).

Or am I wrong?

Thanks and I'm waiting for your reply!

DaKa
Title: Re: Moving inside a moving vehicle
Post by: h- on 26 Dec 2012, 09:34:47
Walking inside the vehicle while it's moving it is extremely hard to do, if possible at all, and very dodgy at best (most likely to break down in MP I reckon).
There was some stuff like this done back in the golden days of OFP I think, IIRC, but nothing regards this has changed in A2.

The attachTo you're talking about only attaches the object to another, obviously you can't move because you're attached to a specific position.
Title: Re: Moving inside a moving vehicle
Post by: Gnat on 30 Dec 2012, 03:53:53
Further to H's comments, only the Military version of the ArmA engine (VBS) has true free movement within / on a moving vehicle.
For the ArmA engine you only have a few options.
If you try using the actual PROXY (cargo) positions, they are always loaded with people starting at Position 1 through to the last, so you need to use tricky scripts to "Deny" certain positions and let you select your position of choice within a vehicle. This is a type of "moving", but there's limited interaction with the environment.

If you want to use memory positions (named within the model) for moving you could (only) SETPOS or ATTACHTO these positions, but again the player has limited movement once there.

Heres some old work I did in ArmA1
http://www.youtube.com/watch?v=JjOaP2ITem0
Demo Code
http://members.iinet.net.au/~nrspence2/ArmA/ActiveCargoDemoMissions_1.zip

Now that we have the ATTACHTO command in ArmA2, maybe this concept could be improved.
Hope that helps.
Title: Re: Moving inside a moving vehicle
Post by: DaKa on 02 Jan 2013, 20:42:16
Thanks very much for this! Isn't giving a "trade secret" from a veteran modeler to a newbie a sacrilege?  :P

Anyway, I'll start digging through these stuff, as soon as I get near my PC. Thank you. If I get something working, I'll post an update.

Thanks again, this just made my day!  :D

P.S.: I've noticed that the demo with your ship isn't included in the demo folder. Can I ask you how you did that? You get in as driver, and the chopper stays on the ship. Did you somehow "attach" the chopper?
Title: Re: Moving inside a moving vehicle
Post by: Gnat on 03 Jan 2013, 18:20:04
Yes, chopper is attached to the ship.
The FSF (ship) is released and it now uses the new ATTACHTO command for holding the choppers and RHIBs on board.
Title: Re: Moving inside a moving vehicle
Post by: DaKa on 06 Jan 2013, 18:03:17
Ah, yes, I thought as much!  :D Will fiddle around in O2. If I manage to get it to work somehow, I'll post it up. Thanks for the help!