Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Eject Script

Hybrid View

  1. #1
    Master Gunnery Sergeant
    Join Date
    Nov 20 2010
    Location
    Sweden / Germany
    Posts
    1,058

    Eject Script

    Hi,

    I'm currently working on a mission where I have to insert a SpecOps team. When I approach the landing zone, they should eject. I am not inside the group, nor am I the leader of it. They are on their own, they have their waypoints. Everything works fine except the eject part.
    I've been doing it step by step after Rommel's Eject tutorial.

    My Eject.sqf:

    _group = _this select 0;
    _vehicle = _this select 1;

    if ( (typename _group != "grpAlpha") or (typename _vehicle != "UAZ") ) exitwith {
    hintSilent "Invalid Parameters parsed";
    };

    sleep 1;

    {
    unassignvehicle _x;
    _x action ["EJECT", _vehicle];
    sleep 0.5;
    } foreach units _group;

    SpecOps leader init line:

    unit1 moveincargo UAZ; grpAlpha = group this;

    The team got 4 units, each unit got a moveInCargo command in their init line.

    The eject command is linked to a trigger, which activates when I approach the landing zone marked with smoke.

    _xhandle = [grpAlpha,UAZ] execvm "Eject.sqf";

    The group has a "Get out" waypoint, however, linking the eject command to that waypoint won't work.

    So, what am I doing wrong? I really have no clue.

  2. #2
    Quote Originally Posted by tryteyker View Post
    My Eject.sqf:

    _group = _this select 0;
    _vehicle = _this select 1;

    if ( (typename _group != "grpAlpha") or (typename _vehicle != "UAZ") ) exitwith {
    hintSilent "Invalid Parameters parsed";
    };

    sleep 1;

    {
    unassignvehicle _x;
    _x action ["EJECT", _vehicle];
    sleep 0.5;
    } foreach units _group;

    So, what am I doing wrong? I really have no clue.
    Remove RED operators and quotes (blue)
    Code:
    _group = _this select 0;
    _vehicle = _this select 1;
    
    if ( (typename _group != grpAlpha) or (typename _vehicle != UAZ) ) exitwith {
    	hintSilent "Invalid Parameters parsed";
    };
    
    sleep 1;
    
    {
    	unassignvehicle _x;
    	_x action ["EJECT", _vehicle];
    	sleep 0.5;
    } foreach units _group;

  3. #3
    Master Gunnery Sergeant
    Join Date
    Nov 20 2010
    Location
    Sweden / Germany
    Posts
    1,058
    Author of the Thread
    Code:
    if ( (_group != "grpAlpha") or (_vehicle != "UAZ") ) exitwith {
    	hintSilent "Invalid Parameters parsed";
    };
    Like this?

  4. #4
    I would just get rid of that part.
    empty all your clips at their locations

    Vote!
    http://feedback.arma3.com/view.php?id=9341 - Random placement of units and waypoints does not work near buildings
    http://feedback.arma3.com/view.php?id=17665 - Backpacks can't be placed accurately in editor
    http://feedback.arma3.com/view.php?id=15249 - Add scripting command to disable certain stances

  5. #5
    Master Gunnery Sergeant
    Join Date
    Nov 20 2010
    Location
    Sweden / Germany
    Posts
    1,058
    Author of the Thread
    Quote Originally Posted by 2nd Ranger View Post
    I would just get rid of that part.
    Well it's actually a little training mission for me, so I can train quick insertion / extration as pilot.
    So I can't really get rid of that part.

    Code:
    _group = _this select 0;
    _vehicle = _this select 1;
    
    if ( (typename _group != grpAlpha) or (typename _vehicle != UAZ) ) exitwith {
    	hintSilent "Invalid Parameters parsed";
    };
    
    sleep 1;
    
    {
    	unassignvehicle _x;
    	_x action ["EJECT", _vehicle];
    	sleep 0.5;
    } foreach units _group;
    I have done this now, however, it isn't working.
    Last edited by tryteyker; Jun 30 2011 at 12:08.

  6. #6
    Well it looks to me like your comparing grpalpha to grpalpha and uaz to uaz all the time because your passing the group through the call _xhandle = [grpAlpha,UAZ] execvm "Eject.sqf";

    perhaps something like this

    Code:
    _group = _this select 0;
    _vehicle = _this select 1;
    
    if ( (player in _vehicle) and (group player  != _group)  ) exitwith {	
    
    	hintsilent "Invalid Parameters parsed";
    	};
    
    
    sleep 1;
    
    {
    	unassignvehicle _x;
    	_x action ["EJECT", _vehicle];
    	sleep 0.5;
    } foreach units _group;
    I haven't test it , so it may not work or be what your after.

  7. #7
    Yeah, that's a lot of extra work for something that should be simple. F2k Sel's code is basically the "classic" version of this. Here's what I use to eject a group from whatever vehicle they are in.

  8. #8
    Actually I may have miss read his post and just the eject is failing, if that was the case then the problem lies with the trigger as it ejects fine for me.

  9. #9
    Master Gunnery Sergeant
    Join Date
    Nov 20 2010
    Location
    Sweden / Germany
    Posts
    1,058
    Author of the Thread
    I've tried both scripts, the first script from F2k Sel, however no luck.
    I still used the old init line for the "Get out" Waypoint (_xhandle = [grpAlpha,UAZ] execvm "Eject.sqf".

    After that, I tried kylania's script, but still nothing.
    Basically, I got an invisible Helipad with white smoke as landing zone. I am the pilot, inserting that team. The teamleader got a "Get out" waypoint placed ontop of the Helipad, in the "On Act." field is this:

    Code:
    nul = [groupName] execVM "groupEject.sqf";
    groupName is obviously grpAlpha.
    Still, the group is not ejecting, and there's nothing coming from the teamleader.
    When I join his team and give him a waypoint, it works fine, he says "Disembark" over the radio.
    However, I cannot use it because I am planning to have a Co-Pilot that is under my command, and ArmA automatically ejects me when I am on the ground, together with the team.

  10. #10
    Are they actually landing? If so, you don't need a script for that or anything really. These eject scripts are used for paradrops usually.

    Can you post the mission you have so far? Maybe something else isn't working here that's causing problems.

Page 1 of 3 123 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
  •