-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added DMS_fnc_TargetsKilledPercent function, to check % of alive bots #81
base: master
Are you sure you want to change the base?
Conversation
…if count <= value in DMS_AI_KillPercent - go nect to playerNear condition and finish mission Changed bandit.sqf mission to demonstrate function working. Change DMS_fnc_MissionSuccessState function to work with new condition.
Fixed, tested with DMS_AI_KillPercent = 50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a global variable to record the initial count only works if there is a single mission, or the same number of initial AI for each mission.
I'm not sure there's an easy way to resolve this without modifying the mission itself. I think it would be easiest to have the threshold calculated by the mission, and then pass the threshold as an additional parameter to fn_TargetsKilledPeecent.
I have an error 19:24:48 Error in expression <pletionArgs]; if (_success && {_absoluteWinCondition}) the> if (!_success && {!_absoluteWinCondition}) th> case "playernear": if (_success && {_absoluteWinCondition}) the> _success; But have no idea how to fix it now. Do u know da way? |
I found the decision, need more time to test |
…working with more args in killpercent case, now we take initial count of bots on mission then mission start
Have some issue with Initial unit count and Total living units This result then mission starts. Bots count in mission _AICount = (5 + (round (random 4))); 12:28:56 "DMS DEBUG :: Kill percent value: 50" After killing 3 bots 12:29:56 "DMS DEBUG :: Kill percent value: 50" Now Total living units = Initial unit count Result 12:30:56 "DMS DEBUG :: Kill percent value: 50" Killing one more 12:32:11 "DMS DEBUG :: Kill percent value: 50" It`s work almost fine, but i think that need some fix here If i use _AICount = 5 ; instead _AICount = (5 + (round (random 4))); Total living units > Initial unit count too. What do you think about this? |
Solved |
Hey! How are you? |
Added DMS_fnc_TargetsKilledPercent function, to check alive bots and if count >= value in DMS_AI_KillPercent - go nect to playerNear condition and finish mission
Changed bandit.sqf mission to demonstrate function working.
Change DMS_fnc_MissionSuccessState function to work with new condition.