RyanM 0 Posted July 12, 2009 Ok so here is the problem. I have a trigger set up that is set activated to by activated by anybody. In the "On Act." field is tskCaptureBase = player createSimpleTask ["capture Base"];tskCaptureBase setsimpledescription ["Capture Enemy Base", Capture Base", "Enemy Base"];tskCaptureBase setsimpletaskdestination (getMarkerPos "base"). All of this is working correctly. Then I have another trigger around the base that is activated when OPFOR "Not Present" and the "On Act" field in this trigger is tskCaptureBase setTaskState "Succeeded"; This also seems to be working right. My problem happens when I want to end the mission. How do I make the mission end when all the tasks are compelete? I searched the forum and found one post that said to make a end trigger with this in the On Act. field "taskCompleted TASKNAME" (in my case I put it as taskCompleted CaptureBase) but when I do that a message comes up in the editor saying "Type Bool, expected Nothing". When I type it as "taskcompletedCaptureBase" (without space) it will let me through without the warning message coming up but it doesnt end the mission when the task is complete. Does someone know what the problem is? How do I make the mission end when the task has been completed? thank you Share this post Link to post Share on other sites
GunnDawg09 10 Posted July 12, 2009 In your init.sqf make like base_clear = false; then make two triggers. In one make the condition base_clear; and in the on Act: make end=true; Then make another trigger that is "End #1" with the condition saying: end Finally, in the trigger that has OPFOR Not Present, put this in the On Act: base_clear = true; Basically you have a boolean (base_clear) set to false when the mission starts. Then you have a trigger that deteces if OPFOR is present, and if it isnt, it sets the boolean (base_clear) to true. Then you have another trigger that checks to see if base_clear = true. If it is then it makes the end boolean true, which in turn executes End #1 Share this post Link to post Share on other sites
mr_centipede 31 Posted July 12, 2009 you have to set the trigger type as end type... default is NONE... Share this post Link to post Share on other sites
GunnDawg09 10 Posted July 12, 2009 The way I explained it will allow you to end the mission with more than just one condition. if you want to have two bases clear then have like base1_clear = false; base2_clear = false; and then on the 2nd base you'd make the trigger On Act be. base2_clear = true; Share this post Link to post Share on other sites
RyanM 0 Posted July 12, 2009 thanks for the help, i will give it a true. Man this whole objective thing seemed a lot easier back in OFP....lol Share this post Link to post Share on other sites
Cellus 10 Posted July 12, 2009 tskCaptureBase = player createSimpleTask ["capture Base"] therefore taskcompleted CaptureBase should be taskcompleted tskCaptureBase New myself, so I did try this and it worked. Share this post Link to post Share on other sites
RyanM 0 Posted July 13, 2009 thanks, that got it working. Cellus you where right, had to change taskcompleted Capturebase to taskcompleted tskcapturebase Share this post Link to post Share on other sites
redmotion 10 Posted July 29, 2009 I was also getting the "Type Bool, expected Nothing" message, so I put the code into the Condition field instead of OnAct and it worked: taskCompleted tskExample1 && taskCompleted tskExample2; Also, rather than seperate the conditions with semi-colons for two or more conditions, I used "&&" between (which means AND). Share this post Link to post Share on other sites