Alex116
Member-
Content Count
31 -
Joined
-
Last visited
-
Medals
Everything posted by Alex116
-
UAV - Module not syncing with object added trough script.
Alex116 replied to Alex116's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Noone? I'm really stuck here, just cant get this to work. -
unexplainable line error / .sqf spawned units
Alex116 replied to Alex116's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Mhmm, I understand the concept. And the above are indeed better concepts for my mission. What I actually am trying to achieve here is a extraction by helicopter. 1. - Player activates a trigger by radio. 2. - Chinook spawns, gets an assigned waypoint where it should hover untill everyone is in. 3. - Chinook dusts off towards the next waypoint. I'd like for the chinook to have an exact spot where it would hover, as I will inform the player of the exact grid the extraction heli will be waiting for him. EDIT: I used the markers and reffered to them to set the waypoints. _wp0 = _chinookgrp addWaypoint [(getmarkerpos "marker1"),0]; It doesnt give me any errors anymore when running extraction.sqf This is what extraction.sqf currently looks like ; waituntil {!isnil "bis_fnc_init"}; hint "extraction.sqf loaded"; _sv = [[-1798.3533,0.66139376,8885.2871],258.047,"CH_47F_EP1",WEST] call BIS_fnc_spawnVehicle; _chinook1 = _sv select 0; _chinookgrp = _sv select 2; _pilot2 = (driver _chinook1); _pilot2 setSkill 1; _chinook1 flyInHeight 25; _wp0 = _chinookgrp addWaypoint [(getmarkerpos "marker1"),0]; _wp0 setWaypointType "MOVE"; _wp0 setWaypointSpeed "NORMAL"; _wp0 setWaypointBehaviour "CARELESS"; _wp0 setWaypointStatements ["true", "_chinook1 flyInHeight 2.5"]; _wp0 setWaypointStatements ["true", "_chinook1 animate 'Ani_Ramp'"]; _wp0 setWaypointVisible false; _pilot2 doMove (getWPPos _wp0); _wp1 = _chinookgrp addWaypoint [(getmarkerpos "marker2"),0]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointSpeed "NORMAL"; _wp1 setWaypointBehaviour "CARELESS"; _wp1 setWaypointStatements ["!isEngineOn crrc1 AND crrc1 distance _chinook1 < 5, _chinook1 flyInHeight 2.5", "nul=[crrc1, _chinook1] execVM 'scripts\crrcload\onceAboard.sqf'"]; _wp1 setWaypointVisible false; However its not spawning the helicopter, hence nothing happens. EDIT2: I changed the position where the chinook will spawn with a marker position. Wich seemed to do the trick. I'll do some finetuning to the rest. Thanks a lot guys. -
unexplainable line error / .sqf spawned units
Alex116 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey, I've been trying to create an chinook when a trigger is activated, upon the triggers activation a chinook spawn, gets his waypoints assigned and thats it. So I created this sqf for the chinook the spawn when the trigger gets activated. Tough it keeps giving me line errors. It say's that theres a line error, missing a "]" at line 34. Tough I dont see any problem with this line. Line 34 bolded. hint "extraction.sqf loaded"; _sv = [-1798.3533,0.66139376,8885.2871,258.047,CH_47F_EP1,WEST] call BIS_fnc_spawnVehicle; // Name the vehicle and group chinook1 = _sv select 0; // vehicle spawned. chinookgrp = _sv select 2; // group of vehicle so waypoints work. pilot2 = (driver _drophelo); // get pilot of drophelo pilot2 setSkill 1; // set high skill on pilot. // set what height drophelo will fly in: this seems to fix the crash when spawned at altitude _drophelo flyInHeight 25; _wp0 = chinookgrp addWaypoint [-4269.061,0.83947325,7436.7705,0]; _wp0 setWaypointType "MOVE"; _wp0 setWaypointSpeed "NORMAL"; _wp0 setWaypointBehaviour "CARELESS"; // set to "CARELESS" if trouble with enemys distracting heli. _wp0 setWaypointStatements [true, chinook1 flyInHeight 2.5]; _wp0 setWaypointStatements [true, chinook1 animate "Ani_Ramp"]; _wp0 setWaypointVisible false; pilot2 doMove (getWPPos _wp0); _wp1 = chinookgrp addWaypoint [-4380.979,0.91219687,7593.9014]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointSpeed "NORMAL"; _wp1 setWaypointBehaviour "CARELESS"; // set to "CARELESS" if trouble with enemys distracting heli. _wp1 setWaypointStatements [!isEngineOn crrc1 AND crrc1 distance chinook1 < 5, chinook1 flyInHeight 2.5, "nul=[crrc1, chinook1] execVM ""scripts\crrcload\onceAboard.sqf]; _wp1 setWaypointVisible false; _wp2 = chinookgrp addWaypoint [-6858.374,0.98020089,6515.7158]; _wp2 setWaypointType "MOVE"; [b]_wp2 setWaypointSpeed "NORMAL";[/b] _wp2 setWaypointBehaviour "CARELESS"; _wp2 setWaypointVisible false; Does any of you see the problem with this sqf? Also, as you can see, on the _wp1 statement the onact executes another .sqf, could this cause any problems? Thanks in advance, -
unexplainable line error / .sqf spawned units
Alex116 replied to Alex116's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I created this helicopter in the editor, and created waypoints for it there. Only to discover that I wanted it only to spawn and follow those waypoints after a unit activated a trigger. Hence I created a trigger, which activates the above script for thhe heli to spawn and follow the waypoints. I took the exact xyz position from mission script and copied them to the extraction script. I dont know how to use markerpositions or anything else more simple. Thanks Conroy for your response, I'll have a look at the code you provided and check the wikipage. I'll let you know what works and not. -
unexplainable line error / .sqf spawned units
Alex116 replied to Alex116's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Aha, I see. Thanks a lot. That seemed to have fixed the errror with my extraction.sqf file. However, I am reciving a new error. This is the line I am using to create a vehicle. waituntil {!isnil "bis_fnc_init"}; hint "extraction.sqf loaded"; _sv = [-1798.3533,0.66139376,8885.2871,258.047, 258.047 , "CH_47F_EP1", WEST] call BIS_fnc_spawnVehicle; // Name the vehicle and group _chinook1 = _sv select 0; // vehicle spawned. _chinookgrp = _sv select 2; // group of vehicle so waypoints work. _pilot2 = (driver _chinook1); // get pilot of drophelo _pilot2 setSkill 1; // set high skill on pilot. // set what height drophelo will fly in: this seems to fix the crash when spawned at altitude _chinook1 flyInHeight 25; _wp0 = _chinookgrp addWaypoint [-4269.061,0.83947325,7436.7705,0]; _wp0 setWaypointType "MOVE"; _wp0 setWaypointSpeed "NORMAL"; _wp0 setWaypointBehaviour "CARELESS"; // set to "CARELESS" if trouble with enemys distracting heli. _wp0 setWaypointStatements ["true", "_chinook1 flyInHeight 2.5"]; _wp0 setWaypointStatements ["true", "_chinook1 animate 'Ani_Ramp'"]; _wp0 setWaypointVisible false; _pilot2 doMove (getWPPos _wp0); _wp1 = _chinookgrp addWaypoint [-4380.979,0.91219687,7593.9014]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointSpeed "NORMAL"; _wp1 setWaypointBehaviour "CARELESS"; // set to "CARELESS" if trouble with enemys distracting heli. _wp1 setWaypointStatements ["!isEngineOn crrc1 AND crrc1 distance _chinook1 < 5, _chinook1 flyInHeight 2.5", "nul=[crrc1, _chinook1] execVM 'scripts\crrcload\onceAboard.sqf'"]; _wp1 setWaypointVisible false; _wp2 = _chinookgrp addWaypoint [-6858.374,0.98020089,6515.7158]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointSpeed "NORMAL"; _wp2 setWaypointBehaviour "CARELESS"; _wp2 setWaypointVisible false; -
unexplainable line error / .sqf spawned units
Alex116 replied to Alex116's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Mhmm. I see the mistake I made at line 29. Tough, I'm not entirely sure what "Trigger statements have to be strings." means. What is it you actually changed?