Page 1 of 9 12345 ... LastLast
Results 1 to 10 of 90

  Click here to go to the first Developer post in this thread.  

Thread: Creating group with BIS_fnc_spawnGroup

  1. #1
    Private First Class
    Join Date
    Jun 3 2009
    Location
    Russia, Rostov-on-Don
    Posts
    25

    Creating group with BIS_fnc_spawnGroup

    Hi there. I trying to spawn an infantry group by this:
    Code:
    [getPosASL player, side player, "USMC_InfSquad"] call BIS_fnc_spawnGroup
    But nothing happen. Spawning vehicles works fine.

    Description:
    Function which handles the spawning of a dynamic group of characters.
    The composition of the group can be passed to the function.
    Alternatively a number can be passed and the function will spawn that
    amount of characters with a random type.

    Parameter(s):
    _this select 0: the group's starting position (Array)
    _this select 1: the group's side (Side)
    _this select 2: can be three different types:
    - list of character types (Array)
    - amount of characters (Number)
    - CfgGroups entry (Config)
    _this select 3: (optional) list of relative positions (Array)
    _this select 4: (optional) list of ranks (Array)
    _this select 5: (optional) skill range (Array)
    _this select 6: (optional) ammunition count range (Array)
    _this select 7: (optional) randomization controls (Array)
    0: amount of mandatory units (Number)
    1: spawn chance for the remaining units (Number)
    _this select 8: (optional) azimuth (Number)

    Returns:
    The group (Group)
    Vodka? Vodka!

  2. #2
    "USMC_InfSquad" is not a config entry.
    (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> "USMC_InfSquad") would be one.
    Last edited by i0n0s; Jun 7 2009 at 13:24.
    #include "signatur.h"
    "I'm not slacking of. My addon is 'pboing'!"

    Blog about the RTE | Pastebin with SQF support

  3. #3
    Private First Class
    Join Date
    Jun 3 2009
    Location
    Russia, Rostov-on-Don
    Posts
    25
    Author of the Thread
    So.. how should it be? I don't understand.
    Last edited by MiXeR; Jun 7 2009 at 13:16.

  4. #4
    Master Gunnery Sergeant Imutep's Avatar
    Join Date
    Feb 7 2006
    Location
    Where am i ?
    Posts
    1,355
    I tried yesterday the fn_spawnVehicle and the fn_taskDefend but also nothing happen.
    Can you post the comand to call the spawnVehicle or the fn_taskDefend please? I have probs with that. Would be nice! ^^

    Assault Mission Studio - German Mission Editing && Scripting Website

  5. #5
    all the BIS functions is why I really want a developers reference guide. So much goodies, so little information

  6. #6
    Private First Class
    Join Date
    Jun 3 2009
    Location
    Russia, Rostov-on-Don
    Posts
    25
    Author of the Thread
    Quote Originally Posted by Imutep View Post
    I tried yesterday the fn_spawnVehicle and the fn_taskDefend but also nothing happen.
    Can you post the comand to call the spawnVehicle or the fn_taskDefend please? I have probs with that. Would be nice! ^^
    Vehicle spawn: [getPosASL guy, 0, "M1A1", group player] call BIS_fnc_spawnVehicle

  7. #7
    Private First Class
    Join Date
    Jun 3 2009
    Location
    Russia, Rostov-on-Don
    Posts
    25
    Author of the Thread
    HELL YEAH, i did it.
    [getPosASL player, side player, ["USMC_Soldier_SL", "USMC_Soldier_AR"]] call BIS_fnc_spawnGroup
    In the "[]" put list of infantry units.
    But i still don't understand how to use "- amount of characters (Number)" and "- CfgGroups entry (Config)"
    Last edited by MiXeR; Jun 7 2009 at 13:30.

  8. #8
    Master Gunnery Sergeant Imutep's Avatar
    Join Date
    Feb 7 2006
    Location
    Where am i ?
    Posts
    1,355
    Nice..thx a lot
    Now hopefully i become the fn_taskDefend to work

  9. #9
    Code:
    [getPos player, side player, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> "USMC_InfSquad")] call BIS_fnc_spawnGroup
    Code:
    [getPos Player, 0, "HMMWV", side player] call BIS_fnc_spawnVehicle
    Code:
    [group Bla, getPos Bla] call BIS_fnc_taskDefend
    where Bla is a unit of an AI group.

  10. #10
    Private First Class
    Join Date
    Jun 3 2009
    Location
    Russia, Rostov-on-Don
    Posts
    25
    Author of the Thread
    i0n0s, thanks a lot!

Page 1 of 9 12345 ... LastLast

Posting Permissions

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