Jump to content
Sign in to follow this  
S3LMON

Can waituntil and while be used together? I don't know what to say about this problem...Please help me!

Recommended Posts

Good morning

I found a very interesting reinforcement script.

 

 

 

However, I want this script to run over and over again in the middle of the mission.

Better if it only works when there is a player in the operating area (distance Intel_Pos <200).

 

But my mission structure is for example

If it is a mission to find Intel, assign the Intel spawn location (Intel_Pos) and create an Intel object.
The mission is completed when the player comes around the Intel spawn location via waituntil.

 

waitUntil {{_x distance Intel_Pos <1.5} count Missions_Playable> 0 };

After a lot of trial and error, I've gotten between "createVehicle" for Intel creation and "waitUntil" for mission ending.

[]spawn {
	while {{_x distance Intel_Pos <200} count Missions_Playable> 0} do {
		TB_Spawn_Marker = selectrandom["TB_Spawn_Marker_1", "TB_Spawn_Marker_2"];
		TB_Spawn_Off_Marker = [Intel_Pos, 500] call BIS_fnc_nearestRoad;
		veh = ["O_APC_Tracked_02_cannon_F",[TB_Spawn_Marker],[TB_Spawn_Off_Marker],[Intel_Pos]] call TB_fnc_motoInfReinforce_Main;
		sleep (random 20 +10);
	};
};


I tried putting code like this, but it didn't work as expected.

I don't think of the right way anymore.


In the first place I am wondering what script can I "repeat" between "createVehicle" for Intel creation and "waitUntil" for mission termination...!!

 

If possible, I would like to know if there is any way to make the script repeat over that section.

I am a beginner in scripting and this problem has plagued me day and night for days...

 

That's why I'm confused even if I asked this question correctly.
(If it's a trivial problem that wasn't even worth the question....wow...)

 

I desperately need the help of script masters...

 

Thank you for reading 🙂

 

I'm not an English speaking person, so I'm not sure if my intention was accurately conveyed.

If I have spoken rudely or looked polite, that's definitely not my real intention.

Since I am using Google Translator, I know roughly how it was translated, but I don't know specifically.

🙂

 

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  

×