GregRUS 10 Posted September 28, 2010 Hello guys! I wrote a small MP script for some vehicles that can attach/detach another landvehicles but there is a problem: How do I get a boolean of vehicle that have attached another vehicles already to avoid attach collapse? Thanks. Share this post Link to post Share on other sites
Muzzleflash 108 Posted September 28, 2010 Well you can use setVariable to set data on units. For example you attach unit A and B, then you setVariable something: _a setVariable ["Attached", _b, true]; _b setVariable ["Attached", _a, true]; If you want to check if something is attached then you can do: if (!isNil {_a getVariable "Attached"}) then { //... E.g. detach }; When you detach you can set the value to nil again //A and B has been detached _a setVariable ["Attached", nil, true]; _b setVariable ["Attached", nil, true]; Share this post Link to post Share on other sites
GregRUS 10 Posted September 28, 2010 Thank you.. but as I understood this is local variables.. and when I rejoin the server they will disappear... also newly connected users cant see this vars too... Share this post Link to post Share on other sites
kylania 546 Posted September 28, 2010 The true in those examples above mean in ArmA2 they will be publicly broadcast. Share this post Link to post Share on other sites