Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Task completes only if other task complete

  1. #11
    Yes I tried

    Code:
    {_x in thisList} count units alpha > 0 and {_x in thisList} count units bravo > 0 and !alive cache;
    instead of

    Code:
    {_x in thisList} count units alpha > 0 and {_x in thisList} count units bravo > 0 && destroy;
    That worked, now I can only complete the task if the condition to complete the previous task (which is destroy the cache - an ammo boxed named "cache") has been met.

    I wonder why I can't get it working with && destroy though? Have you actually tried doing that yourself and know it should work? For some tasks it would be a lot easier to just say the condition && TaskName instead of saying condition and condition of other task.
    Last edited by clydefrog; Jul 4 2012 at 14:36.

  2. #12
    Master Gunnery Sergeant
    Join Date
    Mar 8 2011
    Location
    Poland, Sieradz
    Posts
    1,215
    Becose that destroy should be in if i remember task6 but in on act:
    in condition: not alive cache
    on act: destroy=true

  3. #13
    I thought saying destroy=true meant that destroy is now the current task, that's what I was told.

    so in my destroy objective complete trigger, it says rv=true meaning rv is now the current task

    ahhh that is probably where i was going wrong, I've now tried it with:

    Code:
    {_x in thisList} count units alpha > 0 and {_x in thisList} count units bravo > 0 && destroy;
    after setting the destroy cache trigger to condition: !alive cache and on act: destroy=true; task6 settaskstate "SUCCEEDED"; [task6] call mk_fTaskHint; player setcurrenttask task7;

    and it works
    Last edited by clydefrog; Jul 4 2012 at 14:59.

  4. #14
    Master Gunnery Sergeant
    Join Date
    Mar 8 2011
    Location
    Poland, Sieradz
    Posts
    1,215
    Thats way its better to use for that obj1=true, obj2=true for that in task1, task2 etc its all clear and you should not make any mistakes when you use names like this

  5. #15
    So obj=true definitely means objective is complete? I must have remembered something wrong from the tutorials I used.

    I just rechecked the example mission for the tutorial i used and it is from somebody good at mission making, and on the trigger to complete the objective it says next objective=true in the on act

    e.g. for obj1, in the trigger it says obj2=true, not obj1=true.

    ---------- Post added at 17:17 ---------- Previous post was at 16:05 ----------

    Ok new problem with this lol

    now that i use =true this way, my task hint thing comes up twice saying the task is accomplished

    Code:
    task6 settaskstate "SUCCEEDED"; [task6] call mk_fTaskHint; player setcurrenttask task7; destroy=true;
    Code:
    task7 settaskstate "SUCCEEDED"; [task7] call mk_fTaskHint; player setcurrenttask task8; rv=true;
    both make the task accomplished hint show up twice for each one.
    Last edited by clydefrog; Jul 4 2012 at 15:14.

  6. #16
    Master Gunnery Sergeant
    Join Date
    Mar 8 2011
    Location
    Poland, Sieradz
    Posts
    1,215
    You dont have to use words obj1=true or obj2=true in on act window. You can use whatever word you likie for all tasks: cat=true, frog=true that is not importent, You only must remember to use correct words if you use them leter in triggers (cat && frog etc).
    Ps: can you write code from your conditions from both triggers (task6 and 7), maybe there uis something wrong?

  7. #17
    Quote Originally Posted by tom3kb View Post
    You dont have to use words obj1=true or obj2=true in on act window. You can use whatever word you likie for all tasks: cat=true, frog=true that is not importent, You only must remember to use correct words if you use them leter in triggers (cat && frog etc).
    Ps: can you write code from your conditions from both triggers (task6 and 7), maybe there uis something wrong?
    Yeah I know that, I'm not using ojb1, obj2 etc. i'm using words that describe the task e.g. rescue, destroy, rv etc.

    here's the code that I'm using since you said to put the =true thing for the completed objective and not the next one.



    task6 destroy cache trigger:

    condition: !alive cache

    on act: task6 settaskstate "SUCCEEDED"; [task6] call mk_fTaskHint; player setcurrenttask task7; destroy=true;



    task7 rendezvous trigger

    condition: {_x in thisList} count units alpha > 0 and {_x in thisList} count units bravo > 0 && destroy

    on act: task7 settaskstate "SUCCEEDED"; [task7] call mk_fTaskHint; player setcurrenttask task8; rv=true;


    and I also have a trigger to call up those taskhints e.g for rendezvous.

    condition: rv

    on act: [task7] call mk_fTaskHint;


    As I said the guy who's tutorials I saw would have say objective 1 called obj1, and then in the trigger for completing objective 1 he would put "obj2=true" which is not the way you are using it.
    Last edited by clydefrog; Jul 4 2012 at 16:53.

  8. #18
    Master Gunnery Sergeant
    Join Date
    Mar 8 2011
    Location
    Poland, Sieradz
    Posts
    1,215
    I checked your conditions etc, and this script pack for Taskhints that you use, and all look good. Sorry but now i dont know whats wrong . Maybe later i find something.
    Maybe you dont ned that rv=true and rv trigger i dont know really.
    Last edited by tom3kb; Jul 4 2012 at 18:27.

  9. #19
    Quote Originally Posted by tom3kb View Post
    I checked your conditions etc, and this script pack for Taskhints that you use, and all look good. Sorry but now i dont know whats wrong . Maybe later i find something.
    Maybe you dont ned that rv=true and rv trigger i dont know really.
    Seems I have it working now, the those extra task hint trigger things i have e.g.

    condition: rv

    on act: [task7] call mk_fTaskHint;

    it's actually meant to show the next task's taskhint so I've put them all up one, so now it would read (as i haven't done it for this task yet because i don't have task8 yet):

    condition: rv

    on act: [task8] call mk_fTaskHint;

    I've done this for all other tasks and now they work. Hopefully no more problems with that stuff now heh. Btw is there a way to do Not in thisList as well as in thisList? I'd like a different way to detect when units are out of an area other than the distance thing. And it has to be 2 named units so I can't use blufor not present or anything like that. Or can you use not present together with thisList so that when they move out of the trigger area the trigger is fired? I'll give that a try.
    Last edited by clydefrog; Jul 4 2012 at 20:03.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Spawning object if task complete
    By dodek96_pl in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 6
    Last Post: Mar 13 2011, 08:02
  2. Task won't complete
    By koalasalad in forum ARMA 2 & OA - GENERAL
    Replies: 2
    Last Post: Feb 12 2011, 20:23
  3. Complete task with IED
    By Militantsausage in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 10
    Last Post: Oct 12 2010, 22:22
  4. Repsawn on task complete
    By Fenrir in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 6
    Last Post: Sep 17 2009, 07:07
  5. cant complete a task in editor
    By Archamedes in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 11
    Last Post: Aug 4 2009, 19:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •