Editors Depot - Mission Editing and Scripting > OFP - Editing/Scripting General

Attaching Bushes to Vehicles

(1/2) > >>

snafu:
I see one of the features of Arma 3's Tanks DLC is the ability to put bushes on armour as camouflage.

Is this possible with OFP?

I'm making a tank mission adapted from a wargame scenario book and think it would be a nice little addition.

The first obstacle is finding the class names for the bushes. I've found some I'd like to use, does anyone know their class names?

https://steamcommunity.com/sharedfiles/filedetails/?id=1405398138

https://steamcommunity.com/sharedfiles/filedetails/?id=1405398174

https://steamcommunity.com/sharedfiles/filedetails/?id=1405398250

https://steamcommunity.com/sharedfiles/filedetails/?id=1405398325

https://steamcommunity.com/sharedfiles/filedetails/?id=1405398374

Gruntage:
It is possible. It's essentially a setpos loop which uses 3 axis.

When it comes to finding out class names, one method is to do something like this:


--- Code: ---_nObject = [0,0,0] nearestObject 123456;
hint format ["%1", typeof _nObject]

--- End code ---

Not sure if typeof returns the class name.

123456 refers to the object ID of the object you want the class name of. I've never actually done this so the syntax is far from guaranteed and if I were going to do this, I'd use the editorupgrade and access the bushes that way. Then you'd only need to worry about the setpos loop itself.

There's a script knocking about that attaches an M2 machinegun to a vehicle which might be useful to you, as it's basically the same as what you're trying to achieve.

snafu:
Thank you. I'll experiment with the idea and report back on how it works.

h-:
Vanilla bushes don't have class names because they're map objects.
So the only way to "attach" them to tanks is to use editorupgrade bushes.

snafu:
I was trying to keep the mission addon free and in the spirit of the original BIS missions. However, it's not a huge deal to use the editor update as it's something most folks will have.

I found an attach script in the Editor's Depot that looked useful. I attached two bushes but they rotated in the direction of the tank, so it didn't look right.

Wadi's old MG script worked a treat. The downside is that there's no obvious way of manipulating the bush's distance from the centre. You can only change its height. Apart from some basic snippets and intros, scripting is not my strong point.

Anyway, screenshot:

https://steamuserimages-a.akamaihd.net/ugc/910171378795571542/9AC3F2C997A6F5E8D5A56EC3A795E911148EC4B2/

It looks and works OK, there are probably more suitable bushes and so on in user made vegetation packs.

Navigation

[0] Message Index

[#] Next page

Go to full version