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

Thread: How to spawn unit at specific time ?

  1. #11
    Corporal
    Join Date
    Aug 27 2005
    Location
    Bavaria (Bayern) - Germany
    Posts
    91
    Quote Originally Posted by Wiggum View Post
    Thanks again soccerboy !
    But i dont know where i should put "array = [unit1, unit2]"...
    oh that's just an example as to what the array would look like to the computer, if you're trying to get the units from a group you would use
    Code:
    array_name = units groupname
    
    or if you only know one units name then
    
    array_name = units group unitname
    the breakdown of it is
    Code:
    "units" means get the units of a known group name into an array
    "group" means get the known unit's group name
    i'm going to take your script for example the way you have it setup is you're unit's group name will be "_newgroup" so to get the units name in a global array it would be
    Code:
    array_name = units _newgroup
    Group
    Units

    i hope that clarifies things a bit better
    Last edited by soccerboy; Feb 20 2010 at 17:58.

  2. #12
    Master Gunnery Sergeant Wiggum's Avatar
    Join Date
    Jun 17 2009
    Location
    Germany
    Posts
    1,372
    Author of the Thread

    Exclamation

    Sorry, me again...

    But i dont get it...i read some stuff about "arrays" but i dont know how this works.
    Can someone please make a little example mission that has just a empty car that i can spawn with a trigger RADIO ALPHA.
    Now if the spawned car is destroyed a hint message should tell me something, i mean in "Conditions" field of another trigger !(alive .... <- name of car)

    Please, i think this is so important for any mission maker !

  3. #13
    Chief Warrant Officer
    Join Date
    Jul 1 2009
    Location
    Denmark
    Posts
    3,179
    Quote Originally Posted by Wiggum View Post
    Sorry, me again...

    But i dont get it...i read some stuff about "arrays" but i dont know how this works.
    Can someone please make a little example mission that has just a empty car that i can spawn with a trigger RADIO ALPHA.
    Now if the spawned car is destroyed a hint message should tell me something, i mean in "Conditions" field of another trigger !(alive .... <- name of car)

    Please, i think this is so important for any mission maker !
    Here you go, as simple as it gets

    http://www.filefactory.com/file/b070...Spawn.utes.zip
    Casual ArmA Players it's all about teamwork and fun, join now!

    ArmA2 Missions: http://arma2missions.webege.com/

  4. #14
    Master Gunnery Sergeant Wiggum's Avatar
    Join Date
    Jun 17 2009
    Location
    Germany
    Posts
    1,372
    Author of the Thread

    Exclamation

    Thanks JW Custom for your help.

    If you want to know how to give a spawned Unit a name look here:
    Code:
    if (true) then
    {
      _this = createVehicle ["ACE_UH60M", markerPos "AMS_heloStart", [], 0, "FORM"];
      _this setVehicleVarName "unitname";
      unitname = _this;
    };
    http://community.bistudio.com/wiki/setVehicleVarName

    In your spawn script it could look like this:
    Code:
    _helo2 = createVehicle ["ACE_UH60M", markerPos "AMS_heloStart2", [], 0, "FLY"];
    _helo2 setDir -118.24;
    _helo2 setVehicleVarName "heli1";
     heli1 = _helo2;
    Thanks to Imutep and JW Custom !

Page 2 of 2 FirstFirst 12

Posting Permissions

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