f3cuk / WICKED-AI

Wicked AI missions for your server
30 stars 59 forks source link

Kill missions following a capture mission results in incompletable mission #47

Closed SJossy closed 10 years ago

SJossy commented 10 years ago

since AI might still be alive at the capture mission the check: if(ai_ground_units == 0 && ai_vehicle_units == 0) then { _playerPresent = true };

will always fail, I'm pretty sure I know of a good workaround for this if you'd like me to go ahead with it

rockeumel commented 10 years ago

why not delete the timer, if the first Unit of a mission gets damage by a player?

PS: i use trigger to check if a player completed a mission.

SJossy commented 10 years ago

well to stay within the current criteria that one must kill all the AI at the mission, I've added more or less a mission management array that will handle multiple missions going at once and track the AI at each for later down the track.

rockeumel commented 10 years ago

Okay, maybe it helps if i tell how i handle it. i use trigger, at the moment 3 per mission, one for player in radius of 250m to delete the timeout, one to count the timeout and one for mission success (30m radius). The missionsuccesstrigger is my main memory for the mission it included all variables, how many groups are spawned etc. also i save the trigger as object in every unit/group as a variable, so i can get the information from the trigger, if a unit dies, then i can count whether all units at that mission are dead. I also use that information to spawn a new mission. it's only one way to do it, but it works great.

ps: i will remove the third trigger that checks if a player is in range in the next time, because my timer will reset if the first units gets damage by a player

rockeumel commented 10 years ago

why this runs for every player? i thought "ai_ground_units" and "ai_vehicle_units" are global variables and the same for all player, and they are not public.

{ if(ai_ground_units == 0 && ai_vehicle_units == 0) then { _playerPresent = true }; } forEach playableUnits;

SJossy commented 10 years ago

already took that out, I assume it was put there by accident from copy & paste

f3cuk commented 10 years ago

Please go ahead if you think you have a solution. I wont be able to look at this earlier then the weekend.