Search the Community
Showing results for tags 'BIS_fnc_spawnVehicle'.
Found 2 results
-
Help needed spawning an aircraft that patrols an area
DoobieDoobieDoo posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi First of all, thanks to Something Something Games! I am a scripting noob. I spent many months getting simple things to work, and built a couple of mp scenarios, but have had some difficulty with ai aircrew. For more than one iteration of an event, I am using a trigger to spawn vehicles. I can get one aircaft, with pilot, that spawns, but then turns and flies in a straight line to map coords 0000 I can make it produce two pairs, four separate ones, but they all do the same thing. It is supposed to spawn an aircraft when triggered and the aircrew are supposed to then patrol around a marker. Can anyone explain where I am going wrong? My guess is I lack understanding of the link between the spawned group (plane + pilot) and the pilot. Line 5 is the issue, which I have put in bold for clarity ( not in the trigger!). I need to instruct something to patrol that area (around m1, an object name), I keep getting lots of waypoint creation errors when i run it, or undeclared variables. Is there another scripting function that I should use instead of BIS_fnc_taskPatrol ? 0= [] spawn { _spawnLocation = [m1, 1000, (RANDOM 360)] call BIS_fnc_relPos; _airCraft = [_spawnLocation, 180, "O_Plane_Fighter_02_F", ] call BIS_fnc_spawnvehicle; _planePilot = _airCraft select 0; ??? [group _planePilot, getPos m1, 1000] call BIS_fnc_taskPatrol; }; Any help appreciated!- 11 replies
-
- ai aircrew
- bis_fnc_spawnvehicle
-
(and 1 more)
Tagged with:
-
Spawned vehicles change the side of the crew who get in
thomsonb posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am trying to spawn a EAST type of vehicle but have it on the side WEST. Whenever I do this the crew of the vehicle change side back to east! I have tried spawning the vehicle using createVehicle and also BIS_fnc_spawnVehicle. I have tried spawning the WEST crew directly in with moveInDriver, and also tried spawning them outside the empty spawned vehicle, with a getIn waypoint; but as soon as they get in they change to EAST! This only applies to spawned vehicles not empty ones placed in editor. The group change side back to the faction of the vehicle, even though the vehicle was spawned empty. Is this a known bug? Anyone know of a workaround? Thanks EDIT! OK I have done more testing, it seems the problem is nothing to do with the vehicle, but it is the side of the Drivers unit type. Execute this code in the editor and notice how the vehicle changes side to EAST, even though the driver is WEST, it is just because i used an EAST unit type "O_Pilot_F" as the driver, if you change it to "B_Pilot_F" the bug doesn't happen! _grp = createGroup west; _heli = "B_Heli_Transport_01_F" createVehicle getPos player; systemChat ("grp side starts as "+ str side _grp); systemChat ("heli side starts "+ str side _heli); _pilot = _grp createUnit ["O_Pilot_F",getPos player,[],0,"NONE"]; _pilot moveInDriver _heli; systemChat ("grp side is now "+ str side _grp); systemChat ("heli side is now "+ str side _heli); Please let me know if you get the same results with changing the pilot unit type from "O_Pilot_F" to "B_Pilot_F" It seems the helicopter inherits the side from the pilots unit type, not the side of the actual group the unit is in. I'm sure its a bug now. Cheers