Basically we are talking about spawning an object (a section of a bridge) and then repeating it n times moving it further with each iteration. Or maybe attaching newly spawned section to a base increasing offset with each iteration. There is of course a 3rd method, placing each section in the editor manually. Good luck with that.
My preferred method would be to attach sections with attachTo. However in ArmA 3 attached objects appear to have no collision with vehicles unlike in ArmA 2. So if you build a bridge and then drive over it, after you pass the base section of the bridge you will just dive through the next section. On the other hand, attached objects in ArmA 3 will correctly report their current attached position and direction, whereas in ArmA 2 they won’t. To work around attachment problem in ArmA 3 you can take position of attached section, detach it and then move it back into position, then everything works out nicely.
The bridge in the above video was pretty straight forward job. However a foot bridge for example might need some sideways adjustments to align all sections properly.
I’ve constructed this little function that would repeat given object with given parameters. The parameters are:
- [startingPosition, direction, objectClass, repeats, offsetX, offsetY, offsetZ]
ArmA 3 variant
ArmA 2 variant
You can find examples of usage on the next page.
Pages: 1 2