Results 1 to 3 of 3

Thread: Simple spawn script... what am I doing wrong?

  1. #1

    Simple spawn script... what am I doing wrong?

    Ok here is a very simple spawn script I am using that is called from a trigger [this, gamelogic, group1] exec "vehspawnscript.sqf"

    It is on a repeating trigger that will spawn the squad everytime it is killed off.

    Everything spawns, but the guys are not going into the truck. I dont want to name the truck cos the squad may be killed and the script called again spawning a second truck, but before the first truck is deleted or destroyed.

    Is it possible to do this with out naming the truck? or will i have to delete the first one early in the script before I create the second?

    _sp = _this select 0;
    _grp = _this select 1;

    _truck = "Uralopen" createVehicle getPos _sp

    "TeamLeaderE" createUnit [_sp, _grp, "this addweapon binocular; this moveincargo _truck; this assignAsCargo _truck", 0.75, "SERGEANT"]
    "SoldierEG" createUnit [_sp, _grp, "this moveindriver _truck; this assignAsDriver _truck", 0.6, "Corporal"]
    "SoldierE" createUnit [_sp, _grp, "this moveincargo _truck; this assignAsCargo _truck", 0.4, "Private"]
    "SoldierEB" createUnit [_sp, _grp, "this moveincargo _truck; this assignAsCargo _truck", 0.3, "Private"]
    "SoldierEB" createUnit [_sp, _grp, "this moveincargo _truck; this assignAsCargo _truck", 0.3, "Private"]
    "SoldierEB" createUnit [_sp, _grp, "this moveincargo _truck; this assignAsCargo _truck", 0.3, "Private"]
    "SoldierEAT" createUnit [_sp, _grp, "this moveincargo _truck; this assignAsCargo _truck", 0.3, "Private"]
    "SoldierEMG" createUnit [_sp, _grp, "this moveincargo _truck; this assignAsCargo _truck", 0.3, "Private"]

    _grp setBehaviour "safe"
    _grp setformation "LINE"

    exit

  2. #2
    Seem logical to assign a name to that truck and define where exactly they need to mount.

  3. #3
    Yeah I had to name the truck and at the beggining of the script I deleted it. So on the next spawn a new truck is made.

Similar Threads

  1. What is wrong with this group spawn script?
    By Janat in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 10
    Last Post: Dec 30 2011, 14:49
  2. Simple vehicle spawn script problem
    By Signaller in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 2
    Last Post: Jul 3 2011, 17:43
  3. Simple Group spawn script
    By Wiggum in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 6
    Last Post: Nov 21 2009, 18:08
  4. Need expert for a simple spawn script
    By CaptainBravo in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 20
    Last Post: Sep 8 2009, 08:02
  5. NEEDED: Simple AI spawn script
    By Joe Miller in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 6
    Last Post: Jul 16 2005, 00: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
  •