Jump to content
Sign in to follow this  
pvtcharry

A10 Trigger spawn direction

Recommended Posts

Hey guys,

I am new to this forum. I have one simple problem(I hope):

="GroupA10 = CreateGroup West; A10CAS1 = createVehicle [""A10"", [(getMarkerPos ""A10Spawn1"") select 0,(getMarkerPos ""A10Spawn1"") select 1,100], [], 0, ""FLY""]; A10Pilot = GroupA10 createUnit [""USMC_Soldier_Pilot"", [0,0,1], [], 0, ""CAN_COLLIDE""]; A10Pilot moveInDriver A10CAS1; wp1 = GroupA10 addWaypoint [(getmarkerpos ""A10Target1""), 0]; wp1 setWaypointSpeed ""NORMAL""; wp1 setWaypointType ""SAD"";"

so I want this A10 to spawn to an other direction. but the problem is that it's always facing north. I don't know what to change. I already tried everything. I even tried to rotate the Marker. The thing is that I am one day on this issue. Can anyone help me? And I am sorry if there's already a post about this. No lies I searched 1 hour for this on google and here in the forum, but didn't find anything.

Thanks for help guys!

Share this post


Link to post
Share on other sites

Although that will work for a static plane or vehicle but because a plane has velocity that won't change so it flies backwards or at least in the original direction.

Place this in a game logic or trigger to change direction rotate the marker.

GroupA10 = CreateGroup West;
A10CAS1 = createVehicle ["A10", [(getMarkerPos "A10Spawn1") select 0,(getMarkerPos "A10Spawn1") select 1,100], [], 0, "FLY"];
A10Pilot = GroupA10 createUnit ["USMC_Soldier_Pilot", [0,0,1], [], 0, "CAN_COLLIDE"]; 
A10Pilot moveInDriver A10CAS1; 
Mdir=markerdir "A10Spawn1";
A10CAS1vel = velocity A10CAS1;
A10CAS1speed = speed   A10CAS1;
A10CAS1 setVelocity [(A10CAS1vel select 0)+(sin Mdir*A10CAS1speed),(A10CAS1vel select 1)+ (cos Mdir*A10CAS1speed),(A10CAS1vel select 2)];
A10CAS1 setdir Mdir;
wp1 = GroupA10 addWaypoint [(getmarkerpos "A10Target1"), 0];
wp1 setWaypointSpeed "NORMAL";
wp1 setWaypointType "SAD";

Share this post


Link to post
Share on other sites

Need the functions module on the map for this one:

A10CAS = [getMarkerPos "A10Spawn1", [getMarkerPos "A10Spawn1", getMarkerPos "A10Target1"] call BIS_fnc_dirTo, "A10", WEST] call BIS_fnc_spawnVehicle;

A10CAS1 = A10CAS select 0;
A10CAS1 setPosATL [getPosATL A10CAS1 select 0, getPosATL A10CAS1 select 1, 100];

GroupA10 = A10CAS select 2;
wp1 = GroupA10 addWaypoint [(getmarkerpos "A10Target1"), 0]; 
wp1 setWaypointSpeed "NORMAL"; 
wp1 setWaypointType "SAD";

No need for math or velocity or anything like that. heh :)

Edited by kylania

Share this post


Link to post
Share on other sites

Thank you guys for your help! I will try everything out when I am back. Nice to have such helpful people around.

Edit: Thank you Sel man it worked perfecto! :) And thanks to the two other guys for your help. Actually i didn't try kylanias, but will do later!

Edited by PvtCharry

Share this post


Link to post
Share on other sites

One last question! How can I make him careless? tried to change SAD but that didn't help. I wanna him fly through the map without reacting to enemy even when they shoot at him. Would be cool if you help me with this :)

Share this post


Link to post
Share on other sites

You didn't take my advice last time! :)

A10CAS1 setBehaviour "CARELESS";

Add that line after the setPosATL line in my example or after the setDir Mdir line in F2k Sel's example.

Share this post


Link to post
Share on other sites

In case someone wants to do this in Arma 3 here is another way:

[start position, end/delete position, height, "speed", "vehicle", SIDE] call bis_fnc_ambientFlyBy;

Parameter(s):

_this select 0: ARRAY - The position where vehicle will spawn

_this select 1: ARRAY - The end position of the vehicle, it will be deleted here

_this select 2: NUMBER - The spawn and flight height of the vehicle

_this select 3: STRING - The speed the vehicle will move ("LIMITED", "NORMAL", "FULL")

_this select 4: STRING - The classname of the vehicle to spawn

_this select 5: SIDE - The side the vehicle belongs

[getMarkerPos "A10Spawn1", getmarkerpos "A10Target1", 50, "FULL", "B_Plane_CAS_01_F", WEST] call bis_fnc_ambientFlyBy;

Or using x and y positions

[[5500,7400-random 500,50],[0,4400+random 1000-random 500,100],50,"FULL","B_Plane_CAS_01_F",WEST] call bis_fnc_ambientFlyBy;

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×