Results 1 to 5 of 5

Thread: Spawn support squad with with set time between

  1. #1
    Gunnery Sergeant
    Join Date
    Apr 3 2002
    Location
    Brighouse, West Yorkshire. (UK)
    Posts
    576

    Spawn support squad with with set time between

    Hi im trying to call a support squad with a repeating radio trigger. I have the script to call the squad and for the squad to join player/leader. The problem I have is that I want to call this squad several times but have a time between calls lets say 5 mins for example. So i have set the radio trigger to repeat and put 500 in each of the countdowns but it does not work because you can call the squad agin straight away??
    Any help would be great thanks

  2. #2
    G'day,
    One way would be to do it like this :-

    In your init place
    Code:
    squad_timeout = True;
    Publicvariable "squad_timeout";
    In your trigger condition field put
    Code:
    squad_timeout
    and in your script put this at the start
    Code:
    if (!(squad_timeout)) exitwith {hint "You must wait for 5 minutes before you can call a new squad";};
    squad_timeout = False;
    Publicvariable "squad_timeout";
    and this at the end of your script after your spawn code
    Code:
    sleep 300;
    squad_timeout = True;
    Publicvariable "squad_timeout";
    Forgive any errors not at my Arma machine at the moment, but that should do the trick mate.

    Cheers
    Hendo

  3. #3
    Gunnery Sergeant
    Join Date
    Apr 3 2002
    Location
    Brighouse, West Yorkshire. (UK)
    Posts
    576
    Author of the Thread
    That works perfect, exactly what I wanted.
    Many thanks

    btw does 300 equal 300 mins, never been sure about this lol

  4. #4
    Quote Originally Posted by LockJaw-65- View Post
    btw does 300 equal 300 mins, never been sure about this lol
    Heya mate, Glad that it worked for you
    300 = 300 seconds
    sleep will only work with counting seconds.

  5. #5
    Gunnery Sergeant
    Join Date
    Apr 3 2002
    Location
    Brighouse, West Yorkshire. (UK)
    Posts
    576
    Author of the Thread
    Thanks, should have relised that lol. Been playing these games for over 10 years still dont know some basic stuff

Similar Threads

  1. How to Spawn then set the groups Ini
    By psvialli in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 2
    Last Post: Nov 2 2011, 11:56
  2. Spawn heli and set name to it
    By psvialli in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 9
    Last Post: May 6 2011, 13:49
  3. Spawn a rocket and set it at certain direction
    By fadly1979 in forum ARMA 2 & OA : ADDONS - Configs & Scripting
    Replies: 0
    Last Post: Jan 8 2011, 15:03
  4. Squad spawn anybody?
    By BF2_Trooper in forum ARMA 2 & OA - GENERAL
    Replies: 12
    Last Post: Apr 18 2010, 05:05
  5. Set object spawn height
    By oli_uk in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 6
    Last Post: Aug 7 2009, 13:13

Posting Permissions

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