Added DMS_fnc_TargetsKilledPercent function, to check % of alive bots#81
Added DMS_fnc_TargetsKilledPercent function, to check % of alive bots#81Ravenger2709 wants to merge 15 commits into
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.
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? |
|
I'm going to be honest, I don't have the time nor desire to review this properly. If you find somebody competent to review this and they say that it's good, I'll merge it. The onus is on you to find somebody competent. |
|
Thx for honest answer! |
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.