Results 1 to 1 of 1

Thread: call sqf with addAction, then ending the sqf script?

  1. #1

    call sqf with addAction, then ending the sqf script?

    Originally, I was using triggers, but now I am trying to clear my radio. - The chopper is called from an addAction, which executes an sqf. No prob, does what it is suppose to. But now, I cannot get the chopper to RTB. I have been searching and gone through the Wiki. The best example I found was from 2005, by Ghost, but it did not clear anything up for me. (I would not be surprised if I did not use the right search word, since all the dif things are not known to me, even looking through the commands in the Wiki. Heck, I am still trying to figure out the complete dif between variables, values, commands, etc.)

    Here is my RTB trigger:

    Code:
    _trg = createTrigger["EmptyDetector",[0,0,0]];
    _trg setTriggerArea[0,0,0,false];
    _trg setTriggerActivation["India","PRESENT",false];
    _trg setTriggerStatements["this", "AH64D1_ready = 1", ""];
    _trg setTriggerText "Attack Helicopter RTB";
    waitUntil{AH64D1_ready == 1};
    hint "Attack Helicopter RTB";
    // // // // Number = unitName addAction [title, filename, (arguments, priority, showWindow, hideOnUse, shortcut, condition)]

    action_AH64D1_rtb = player addAction ["Attack Helicopter RTB", "AH64D1_rtb\AH64D1_rtb.sqf"];
    (WHAT to put in the AH64D1_rtb.sqf? I have tried a great number of things and combinations, but just cannot get it.)

    Code:
    player removeAction action_AH64D1_rtb;
    hint "Attack Helicopter RTB";
    Now, as 'you' can see, I am using an addAction to call a script to RTB, but, also, what about my very first addAction, (which, BTW, is in my init.sqf), is there something I have to do to end that first? Don't the addAction's stay 'stored', or something?

    Code:
    player addAction ["Request Attack Helicopter", "AH64D1\AH64D1.sqf"];
    And, speaking of the chopper returning to base, is there a way to 'force' the chopper to ignore enemy, at the same time, so that it will RTB? I know setCaptive will make the enemy leave the chopper alone, but I want the chopper to ignore enemy and RTB, when the rtb sqf is executed. In SP, I only play as infantry, with a small squad. I just want the chopper to help me out when I am surrounded by armor, and then get the heck out of there. (I have not really researched that much, since I am still trying to figure out the former.)

    TIA

    ---------- Post added at 04:36 PM ---------- Previous post was at 04:11 PM ----------

    EDIT: Hmmm... I guess, for the chopper, I can just find the command to remove the ammo, and setCaptive, also?
    Last edited by CyOp; Aug 15 2010 at 22:01.

Posting Permissions

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