Jump to content
Sign in to follow this  
rambeaux504

SCUD Launch Countdown/Timeout

Recommended Posts

I have searched for 10 minutes now with no luck. I actually don't even really know what to search, so I'll just ask you guys to help. If you can tell me what to do or direct me some wheres, that'll work.

-----------------------------------------------

Sorry. I think I could figure it out on my own, I usually do, but life has been busy with me lately so I can only sit down and work on a mission for about 10-15 minutes. So I want to turn to the community and learn something new.

-----------------------------------------------

Problem(s):

I will not go into much detail about the mission.

(1) Okay, well I have a SCUD launcher. I have a trigger for a 400m radius. That trigger initiates a count down for 300 seconds (5 minutes). I could easily make the mission stop when that countdown finishes, but I want the soldiers to watch the missile launch so they can let their failure sink in. I know it's very possible.. Maybe I'm over thinking this. I know I can easily set a trigger for a troop 5000m away from the action and sync it to the SCUD trigger, but that's not what I'm looking for.

-----------------------------------------------

(2) I want the base to be defended by OpFor troops. And if the Blufor (and Independents) eliminate all the OpFor, they win (With America F*** Yeah! playing in the background (I already have this scripted in)). But the SCUD launcher is OpFor and I have it rigged to where if it is destroyed, you fail. I guess I could make one big opfor group, group them to a trigger so if they are not present, I win. Hmm... But that looks weird with one big line (wedge, vee, etc.) of OpFor.

-----------------------------------------------

I'm stuck guys. I really feel like these are two simple problems that I am overthinking.

I am also functioning off of 45 minutes of sleep. So sorry for grammar errors and if I don't make much sense.

Share this post


Link to post
Share on other sites

Not really getting what you want to accomplish, what you have done and what you are having problems with? :)

//Commands to control the scud, _scud is the scud vehicle itself.
_scud action ["scudStart",_scud];

_scud action ["scudLaunch",_scud];

_scud action ["scudCancel",_scud];


//Simple loop to check what units are inside a certain radius on a specific spot.
_radius = 400;
_pos = [0,0,0];
while {true} do {
_bluforCount = 0;
_opforCount = 0;
_indyCount = 0;
{
	if (alive _x) then {
		if((_x distance _pos) < _radius) then {
			if(side _x == west) then {
				_bluforCount = _bluforCount + 1;
			};
			if(side _x == east) then {
				_opforCount = _opforCount + 1;
			};
			if(side _x == resistance) then {
				_indyCount = _indyCount + 1;
			};
		};
	};
} forEach playableUnits;

//Some simple logics that can be used to determine what actions to take when
if (_bluforCount > 0) then {_blufors = true;} else {_blufors = false};
if (_opforCount > 0) then {_opfors = true;} else {_opfors = false};
if (_indyCount > 0) then {_indies = true;} else {_indies = false};

if (!_opfors) then {
	//Start launch?
};


sleep 5;
};

Share this post


Link to post
Share on other sites

I'm sorry. I figured everything out between creating this thread and now. I changed the SCUD to civilian. So I could eliminate the rest of the OpFor to complete the mission :) Thanks anyways man! I put that in a notepad for further use ;). As for the mission fail on scud launch, I set another trigger with a count down from 360 seconds for mission failure. It was a really simple fix. Maybe if I think the mission is good enough, I'll post it for all to see.

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  

×