neofit 65 Posted July 10, 2017 I've done some C++ in my day, but the Arma scripting syntax is baffling me. I am not sure how to reference entities. I am talking about the console in a SP game. For instance, to make an NPC switchable to, I type "addswitchableunit cursortarget". That's when I want to run the target through a function. But how to I change a property of an already spawned object, like setting the MaximumLoad on an already spawned vehicle. What is the correct syntax? I point to it with the cursor, open the console, and am trying to type cursortarget.MaximuLoad=1000000000; or cursortarget MaximuLoad=1000000000; Blindly copying from other threads, I've tried stuff like cursortarget setvariable["MaximumLoad", 1000000000]; to no avail. All those stabs in the dark are probably funny to those in the know, but still, how would I go about changing a property? Thanks. Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted July 10, 2017 Arma 3 syntax is pretty much straightforward. At first you got a typo in your example. Second you need to use proper commands as in every other language, neither MaximumLoad nor MaximuLoad are valid scripting commands. Third: Changing object properties can be done to some extend using aforementioned scripting commands, if you want access to everything you'd have to make a replacement config for every object/unit you want to change and make this into a mod. To your problem: For units you could try using setUnitTrait with "loadCoef" parameter. Cheers Share this post Link to post Share on other sites
neofit 65 Posted July 10, 2017 Thanks for the reply. First, I wasn't copy/pasting in the post the stuff I was trying in the console, so yes, typos can occur :) Second, I never inferred that MaximumLoad was a command, I referred to it as a "property" or whatever the term is in Arma and was asking how to modify it, and have tried using a simple operator. Third, I know about the way to change it from a mod, I've even contributed to Rydigier's "Big Trunk" add-on with some vehicle classes I figured were left out. But from time to time you find something new in a mission that's not modified by the add-on, and it's too late since it's already spawned. So I was wondering if there was a way to modify it from a console. setUnitTrait does not seem to work on vehicles. Share this post Link to post Share on other sites
Muzzleflash 111 Posted July 10, 2017 In general you can't change config properties unless they are exposed from a particular script command, like setUnitTrait. It is the case for almost all config properties that you cannot change them unless you modify the addon. I believe you can in VBS, but that won't help you here. It seems from the talk page on Biki - if you look at the bottom - that you are not alone in your request: https://community.bistudio.com/wiki/Talk:setUnitTrait . Share this post Link to post Share on other sites