Results 1 to 3 of 3

Thread: Deploy Rally Point (problem)

  1. #1

    Deploy Rally Point (problem)

    I have a problem with my "Deploy Rally Point" script. It seems to work fine for the leader "s1", but only if the host is s1. If somebody else takes the leader s1 slot, they are not able to deploy the Rally Point at all. I had the script working in another mission I made, but this time I have written the script a little differently. In the past when the Rally Point was deployed, it would first delete the old Rally Point and then create a new one, but this time I have placed the Rally Point at base and when it is deployed someplace else - I simply setPos the Rally Point in the new position. Again everything seems to be working ok, except it only seems to work if the host is player s1.

    init.sqf
    Code:
    if (isServer) then
    {
    	rallyMoved=false;
    	publicVariable "rallyMoved";
    };
    Repeating trigger at base tells player s1 to exec this:
    s1_add_deploy_rally.sqf
    Code:
    if (alive s1) then {
    _actS1 = s1 addAction ["Deploy Rally Point", "rally\s1_deploy_rally.sqf", [], -1, false, true, "", "(_target == _this) && (speed s1) < 7"];
    s1_deploy_rally.sqf:
    Code:
    _manS1 = _this select 0;
    _actS1 = _this select 2;
    
    if (alive s1 and rallyTimer>0) then {
    hint "10 minutes has not yet passed.";
    sleep 6;
    hint "";
    } else {
    
    rallyTimer=1;
    
    rallyMoved = false; 
    publicVariable "rallyMoved";
    waitUntil {!isNil "rallyMoved"};
    
    _manS1 switchMove "AinvPknlMstpSlayWrflDnon_medic";
    sleep 3;
    _manS1 switchMove "amovpknlmstpsraswrfldnon_gear";
    
    nest setDir ((direction _manS1) -180);
    nest setPos (_manS1 modelToWorld [0.5,1.4,((position _manS1) select 2)]);
    
    crate setDir ((direction _manS1) -90);
    crate setPos (_manS1 modelToWorld [1.18,1.85,((position _manS1) select 2)-0.12]);
    
    nest setpos [(getpos nest) select 0, (getpos nest) select 1, -0.1];
    crate setpos [(getpos crate) select 0, (getpos crate) select 1, -0.1];
    
    teleport_to_object setDir ((direction _manS1) -90);
    teleport_to_object setPos (_manS1 modelToWorld [-0.2,+0.6,((position _manS1) select 2)-2]);
    
    "RallyPoint" setMarkerPos getPos teleport_to_object;
    
    sleep 0.5;
    
    rallyMoved = true; 
    publicVariable "rallyMoved";
    waitUntil {!isNil "rallyMoved"};
    
    waitUntil{!(isNil "BIS_MPF_InitDone")};
    [s1,nil,rGLOBALCHAT,"Rally Point deployed and marked on map."] call RE;
    
    sleep 6;
    hint "You cannot deploy a new Rally Point until 10 minutes has passed.";
    sleep 6;
    hint "";
    
    sleep 588;
    rallyTimer=0;
    
    waitUntil {alive s1};
    
    hint composeText [parsetext format["<t size='1' align='center' color='#00FF00'>Rally Point deploy available.%1</t>"]];
    
    };
    so can anybody help me fix this so it works for anybody that choose the leader s1 slot, and not just the host?

  2. #2
    Gunnery Sergeant Mikie boy's Avatar
    Join Date
    Jun 20 2009
    Location
    United Kingdoom
    Posts
    478
    at a quick glance you could try removing the if (isServer) from the init and replace with

    Code:
    if (isnil "rallyMoved") then 
    {
    rallyMoved = false;
    };
    [FOCK] Mikie J

    Looking for New Players at Fockersteam
    http://fockers.moonfruit.com/

    A2/OA
    COOP Most Wanted - [Fockers] Most Wanted Co-x v07-09-2012
    Fock IED - http://www.armaholic.com/page.php?id...highlight=FOCK
    Fock Recruit/Group Management - http://www.armaholic.com/page.php?id=20580

    A3
    TvTCache Hunt - [FOCK]ers Cache Hunt TvT-x [ALPHA]
    Scripting Tutotial -http://www.armaholic.com/page.php?id=20465#comments
    Fock Recruit/Group Management - http://www.armaholic.com/page.php?id=19041

  3. #3
    Gunnery Sergeant A-SUICIDAL's Avatar
    Join Date
    Jul 13 2010
    Location
    NYC
    Posts
    516
    Author of the Thread
    Thanks. I'll try testing that now.

    Basically I am just trying to perform an action where player s1 deploys/moves an object to a new location, but for some reason it only seems to work if the host is player s1.

Similar Threads

  1. Race.. Rally..
    By hon0 in forum TAKE ON HELICOPTERS - SUGGESTIONS
    Replies: 0
    Last Post: Jan 7 2012, 21:54
  2. Deploy-Stow Vehicle Camo problem
    By A-SUICIDAL in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 24
    Last Post: Aug 17 2011, 18:01
  3. Zargabad Rally
    By Rommel in forum ARMA 2 & OA - USER MISSIONS
    Replies: 14
    Last Post: Oct 20 2010, 03:23
  4. Eagle Wing - point Icarus problem/bug
    By Spudgunner in forum ARMA 2 & OA - OFFICIAL MISSIONS
    Replies: 10
    Last Post: Jul 26 2010, 13:00
  5. Tank rally again
    By King Nothing in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 11
    Last Post: Apr 6 2002, 17:55

Posting Permissions

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