Jump to content
Sign in to follow this  
hazey

Active Aircraft Spawn Script Working + Require Addition Help

Recommended Posts

I have been working a small active aviation script that will spawn 3 rusky p39s in group with a waypoint that is set to search and destroy with a large radius when triggered.

It works but I need a little help expanding it.

- I need help figuring out how to make a delete script for this. I want to remove the 3 planes when you move out of the zone. *Note - I spent a few hours attempting a bunch of different combinations and I was unable to figure it out. I am stumped!

Here is the code if you want to play with it. I had some fun with it. By the way developers, despite some of the stupid meta scores and such. You have developed a really fun game and It runs really smooth on the Virtual Engine still a few bugs but that's why you guys have jobs! Kudos guys if you see this post, honestly.

on act =

nul = [this] execVM "ActiveAviation.sqf";

ActiveAviation.sqf

	
               grp1 = createGroup east;
	_wp = grp1 addWaypoint [getPos Alpha, 0];
	[grp1, 0] setWaypointType "SAD";
	[grp1, 0] setWaypointCompletionRadius 500;
	for [{_x = 0}, {_x <= 2}, {_x = _x + 1}] do
	{
		_p39 = "LIB_P39" createVehicle [(getMarkerPos "PlaneSpawn" select 0), (getMarkerPos "PlaneSpawn" select 1), 250];
		_p39 setPos [(getPos _p39 select 0) + (_x * 40), getPos _p39 select 1, 250];
		_p39 engineOn true;
		_p39 setDir 0;
		_dir = 0;
		_speed = 250;
		_p39 setVelocity [(sin _dir * _speed),(cos _dir * _speed), 0];

		"LIB_SOV_pilot" createUnit [getMarkerPos "PlaneSpawn", grp1];
		(units grp1 select _x) moveInDriver _p39;
		(units grp1 select _x) setSkill 1;
		(units grp1 select _x) flyInHeight 25;

	};

Credit:

Script built using online tutorials and resources, if you find that some how this script infringes on your work (You won't) please let me know so it can be removed or proper credit can be given.

Thanks

-Haze

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  

×