TheBoat 10 Posted April 27, 2013 Hey guys, I'm new to scripting and today I wanted to test myself by making a simple script that spawns a littlebird (AH9 version) when I walked into a trigger. Here's the scripts code spawn= getMarkerPos helispawn; createVehicle [b_AH9_F, helispawn]; When I was making it I looked up some of the commands such as getMarkerPos but "helispawn" is the name of the marker I want the helicopter to spawn at. Now, this is the init code on the trigger that goes off upon activation, but the problem is, I cannot even input it because it says "reserved variable in expression". So the first thing I want to know is, will this script work, and the second thing is, what's causing the reserved variable in expression when trying to type this into the "on act" field in my trigger? Share this post Link to post Share on other sites
killzone_kid 1331 Posted April 27, 2013 spawn is arma command you cannot use the same name for variable Share this post Link to post Share on other sites
KevsNoTrev 44 Posted April 27, 2013 also, the classname of the vehicle needs to have "" around it. Share this post Link to post Share on other sites
neokika 62 Posted April 27, 2013 There is currently on going work to lock the ability to override engine scripting commands, no longer possible to do it on dev branch, such as spawn, so that is why you are receiving that message. getMarkerPos expects a string with a marker name. You currently give a (probably?) undefined variable. Your createVehicle is also wrong, currently there are two different implementations of it, the most simple one is: _chopper = "B_AH9_F" createVehicle getMarkerPos "helispawn"; But that one should be avoided and you should definitely use the createVehicle Array: _chopper = createVehicle ["B_AH9_F", getMarkerPos "helispawn", [], 0, "NONE"]; Share this post Link to post Share on other sites
TheBoat 10 Posted April 28, 2013 But that one should be avoided and you should definitely use the createVehicle Array: _chopper = createVehicle ["B_AH9_F", getMarkerPos "helispawn", [], 0, "NONE"]; Can you explain this particular bit of script please? I understand the _chopper, but am not sure what that specifically does, and I understand createVehicle ["B_AH9_F", getMarkerPos "Helispawn", - but after that I'm blanked. What does the , [], 0, "NONE"]; mean to the computer that's running the scripts? Share this post Link to post Share on other sites
dcthehole 1 Posted April 28, 2013 Syntax: Object = createVehicle [type, position, markers, placement, special] As explained here: http://community.bistudio.com/wiki/createVehicle_array Share this post Link to post Share on other sites
HTom 10 Posted December 10, 2017 Hi! there is any way to setvariable "binocular"? 9:25:56 Error in expression <missionNamespace setVariable ["Binocular", [[0, 15], "Equ> 9:25:56 Error position: <setVariable ["Binocular", [[0, 15], "Equ> 9:25:56 Error Reserved variable in expression Binocular is arma command Word... TY for answers ;) Share this post Link to post Share on other sites