st3a1th 0 Posted March 1, 2010 I am trying to attach a empty vehicle to this trigger in a waypoint script so when it is present it will switch. I have named the vehicle in game to veh1 and now trying to associate it with the trigger. Below is the code I am currently using anyone have any ideals ? _trg0 = createTrigger["EmptyDetector",getmarkerpos"trig1"]; _trg0 setTriggerActivation ["Vehicle", "PRESENT", true] _trg0 setTriggerArea[50, 50, 0, false]; _trg0 triggerAttachVehicle "_veh1"; _trg0 setTriggerType "SWITCH"; _trg0 synchronizeTrigger [_waypoint1]; Share this post Link to post Share on other sites
imutep 0 Posted March 1, 2010 If you named the vehicle in game to veh1, why you name it in the script _veh1 ?? ;) Share this post Link to post Share on other sites
ceeeb 147 Posted March 1, 2010 Also, check the syntax: triggerAttachVehicle Share this post Link to post Share on other sites
TheHarvesteR 11 Posted March 2, 2010 Yep. Same goes for _waypoint1, if you named it waypoint1 in the editor :) The underscore prefix is just a convention for naming local variables I think... Cheers Share this post Link to post Share on other sites
Big Dawg KS 6 Posted March 4, 2010 Yep. Same goes for _waypoint1, if you named it waypoint1 in the editor :)The underscore prefix is just a convention for naming local variables I think... Cheers It's not just a convention, adding an underscore will actually define the variable's scope as local to that script. Share this post Link to post Share on other sites