Search the Community
Showing results for tags 'while do loops'.
Found 1 result
-
Hello, everyone! I've been mission editing in CWA & ArmA 3 for several years, but this is my first post here. I'm trying to create a simple "conquest" mission in which the side (East or West) that spends the longest amount of time within a trigger area wins after 1 hour. For each given side, I have both a "Present" and a "Not Present" trigger for the objective area. When a unit of that side enters the trigger area, I want to continually increase that side's score (ex. add 1 point to a variable named "WestScore" for every 10 seconds that a West unit is present). Once all units of that side exit the trigger area, the score for that side should stop increasing. Then, when my timer runs out after 1 hour, "WestScore" and "EastScore" will be compared to determine which "win" trigger fires to end the mission. Naturally, I believe that a basic "while-do" loop is required for a continually-increasing score, but I am at a loss as to how to actually implement one in the game. Can a "while-do" loop be made entirely within my "Present" trigger, or do I need to write an .sqf file (I've never done this before)? Additionally, how would I incorporate a pause within the loop to slow down its iterations (I see that there is no "sleep" command in OFP/CWA like there is in ArmA 3)? So far, I've got everything working except for a mechanism to measure the amount of time that each side spends within the trigger area. Any guidance would be appreciated! Thanks!
- 1 reply
-
- while do loops
- arma cold war assault
-
(and 1 more)
Tagged with: