SovietReign 1 Posted March 22, 2013 So I'm trying to make a mission that has a similar function to Xeno's domination. I want it so that when I complete an objective, a vehicle spawns (and respawns if destroyed). I got some code but it won't work for some strange reason. In the "On act" of the trigger I have _heli1 = "heli1" createVehicle ["MH9_Base_F", getMarkerPos "heli1sp", [], 0, "NONE"]; _heli1 = [this, 5, 1000] execVM "vehicle.sqf"; hint "Congratulations, your team has earned an MH-9. It is now available at base!"; The condition is Obj_1, and it works since the hint fires off but the vehicle won't spawn. Please help me out. Thanks! Share this post Link to post Share on other sites
cobra4v320 27 Posted March 22, 2013 You are using the wrong name try: "B_MH9_F" Share this post Link to post Share on other sites
SovietReign 1 Posted March 23, 2013 Still nothing :( Share this post Link to post Share on other sites
cobra4v320 27 Posted March 23, 2013 (edited) You need to look at createvehicle array: http://community.bistudio.com/wiki/createVehicle_array _heli1 = createVehicle ["B_MH9_F", getMarkerPos "heli1sp", [], 0, "NONE"]; _heli1 = [this, 5, 1000] execVM "vehicle.sqf"; hint "Congratulations, your team has earned an MH-9. It is now available at base!"; Edited March 23, 2013 by cobra4v320 Share this post Link to post Share on other sites
headswe 17 Posted March 23, 2013 When using createVehicle array there is no preceding string argument. _heli1 = createVehicle ["[font=Verdana]B_MH9_F[/font]", getMarkerPos "heli1sp", [], 0, "NONE"]; I assume vehicle.sqf is the vehicular respawn script? Well you are using it wrong. Try [color=#EEEEEE][[/color]_heli1[color=#EEEEEE], 5, 1000] execVM "vehicle.sqf"; [/color] Share this post Link to post Share on other sites
SovietReign 1 Posted March 23, 2013 You guys are gods. Still have two problems though. I assume vehicle.sqf is the vehicular respawn script?Well you are using it wrong. Try When I enter that it tells me that "Local variable in Global slot" or something along those lines. Also, how can I get the helicopter to spawn rotated 90 degrees? I tried rotating both the trigger and marker it spawns on with no luck. Share this post Link to post Share on other sites
cobra4v320 27 Posted March 23, 2013 Yeah you just need to name your helicopter, so instead of _heli1 use heli1. Make sense? _heli1 is local and heli1 is global. Share this post Link to post Share on other sites
SovietReign 1 Posted March 23, 2013 Thanks again :D Do you know how to rotate the vehicle? Share this post Link to post Share on other sites
cobra4v320 27 Posted March 23, 2013 hold down shift key Share this post Link to post Share on other sites
SovietReign 1 Posted March 23, 2013 hold down shift key I need to rotate the vehicle through code don't I? Since the vehicle is spawned through a trigger and isn't anywhere on the map itself. Share this post Link to post Share on other sites