evilnate 0 Posted January 15, 2007 So I've made a mp coop mission that has a few objectives that are required for mission completion. If a player starts playing from the start and doesn't die the briefing keeps track of the objectives met. If someone dies and respawns as another group member, it like resets the completed objectives while others show it as completed. For example: *Johny and Mikey start playing my mission. *Johny blows up a electrical substation and the briefing shows that objective has been completed for both Johny and Mikey. *Mikey gets killed and respawns in one of the other AI controlled group members. When he looks at his briefing, the objective to blowup the electrical substation isn't checked. My destruction objectives are as follows: 1.) Created trigger and grouped it to the building. Changed it to "not present" and enclosed the area around the structure. 2.) In the "on activation" field, I wrote: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">onedone=true; "0" ObjStatus = "DONE"; hint "The building is destroyed" 3.) In another END trigger I put: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ? onedone and twodone and three done to check if all objectives have been completed, and if they have it ENDs the mission. My buddy made a similar mission with multi objectives and he has the same problem with group respawn. Any idears? Share this post Link to post Share on other sites
norrin 9 Posted January 15, 2007 2.) In the "on activation" field, I wrote: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">onedone=true; "0" ObjStatus = "DONE"; hint "The building is destroyed" 3.) In another END trigger I put: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ? onedone and twodone and three done to check if all objectives have been completed, and if they have it ENDs the mission. I could be completely off the mark but what happens if you publicvariable "onedone" in the trigger for instance in the on activation put: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">onedone=true; Publicvariable "onedone"; "0" ObjStatus = "DONE"; hint "The building is destroyed" Then do the same for the other triggers. Then in the end trigger in the Cond put: onedone AND twodone AND threedone ie. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">expCond = "onedone AND twodone AND threedone" I think the correct syntax for AND is capital letters. EDIT: You may also need to define onedone = false; etc. in your init.sqs Share this post Link to post Share on other sites
evilnate 0 Posted January 15, 2007 Thanks for the suggestions, I'll try it out when I get home tonight. Share this post Link to post Share on other sites
evilnate 0 Posted January 18, 2007 I tried the suggestions and it helped, but it's still not checking the objectives that were already completed when a new player joins in progress. The good news is that the suggestions fix the ? onedone AND twodone... trigger to recognize everything as completed so the mission completes. I created two identical simple test missions that has four objectives. There are 2 solders to kill and 2 buildings to destroy. TARGET =true ObjStatus# First building - zerodone - "0" First solder - onedone - "1" 2nd building - twodone - "2" 2nd solder - threedone - "3" I made one that doesn't set onedone/twodone etc. as a pubvar as the control, and one that makes the onedone/twodone etc. public variables. I also set onedone/twodone etc. as false in the init.sqs Since it still wasn't checking off the completed objectives, I tried to make a looping script that constantly checks to see if onedone/twodone becomes true. It's like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;Objective updater #Monitor ~5 ? zerodone : "0" ObjStatus "DONE" ? onedone : "1" ObjStatus "DONE" ? twodone : "2" ObjStatus "DONE" ? threedone : "3" ObjStatus "DONE" goto "Monitor" I added <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this exec "objmonitor.sqs" to each playable init field. The problem is that this doesn't help either. When I was testing this out it only seems to be a problem with objectives related to the destruction of static objects. As of now I am dry on ideas so if someone can help out a complete scripting newbie, please do so. Share this post Link to post Share on other sites