Results 1 to 5 of 5

Thread: Different behaviour in singleplayer/hosted enviroment from dedicated

  1. #1

    Different behaviour in singleplayer/hosted enviroment from dedicated

    So I have a script I use when I make missions for my unit. The script is run in the init of each one of the playable units (straight up through the editor). If I pass "True" in the variables of it, it should spawn everyone under a parachute.

    here's the snippet were the paradrop is created:

    Spoiler:


    This works fine single player and when "hosted" but not dedicated. Before I added the isserver check multiple chutes were created and some people dropped from the sky. In a dedicated environment no chutes are spawned, not even for the AI.

    Any wisdom?

  2. #2
    Master Sergeant sxp2high's Avatar
    Join Date
    Jul 16 2009
    Location
    nearestLocation [(getPos player), "nameCity"];
    Posts
    605
    Hi,

    I'd add a local check. moveInDriver has to be executed where the unit is local.

    Also isserver or isdedicated isn't necessary, isServer is true on a dedicated anyway.

    PHP Code:
    //paradrop
    _para _this select 1;

    if (
    _para && local _manthen {
    _drop 100;
    _pos = [getpos _man select 0getpos _man select 1_drop];
    _chute "Parachute_US_EP1";

    _silk createvehicle [_chute_pos,[], 0"FLY"];

    sleep .5;
    _canopy nearestobject [_pos_chute];
    _man moveindriver _canopy;
    }; 

  3. #3
    Private First Class
    Join Date
    Mar 3 2012
    Location
    Sweden
    Posts
    18
    Author of the Thread
    Thank you sxp. I'll give the local command a whirl. Might be I get some interesting results trying with AI.

    the isdedicated part was just part of my frustrated and ineffective troubleshooting. I was throwing stuff at it to see what sticked.

  4. #4
    Private First Class
    Join Date
    Mar 3 2012
    Location
    Sweden
    Posts
    18
    Author of the Thread
    Ok so the local command worked fine for the players. But I can not get AI to get into the parachutes on a dedicated host. True, we don't play our missions with AI but I'd still like my script to allow for it.

    I tried doing it instead with a setvehicleinit & processinitcommands combo. Again, works fine singleplayer & hosted but not on a dedicated host. Any ideas?

  5. #5
    Private First Class
    Join Date
    Mar 3 2012
    Location
    Sweden
    Posts
    18
    Author of the Thread

    Fixed

    Allright so I fixed it. This is how it ended up. Works in all environments and with both players and AI.

    PHP Code:
    if (_parathen {
            
    cutText ["","BLACK IN",2];
            
            
    _drop 100;
            
    _pos = [getpos _man select 0getpos _man select 1_drop];
            
    _chute "Parachute_US_EP1";

            if (
    isserverthen {_silk createvehicle [_chute_pos,[], 0"FLY"];};
            
            if (
    local _man && !isserverthen {
                
    sleep .5;
            
                
    _canopy nearestobject [_pos_chute];    
                
    _man moveindriver _canopy;
            } else {
                
    sleep .5;
            
                
    _canopy nearestobject [_pos_chute];    
                
    _man setvehicleinit "this moveindriver _canopy;";
                
    processinitcommands;
            };
        }; 

Similar Threads

  1. Working MP briefing for Dedicated & norml hosted games
    By Coffeecat in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 2
    Last Post: Mar 6 2012, 16:15
  2. Someone explain why this script does what it does Hosted vs. Dedicated served
    By Rexxenexx in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 16
    Last Post: Jul 23 2009, 22:47
  3. Disable enviroment sounds?
    By Icewindo in forum ARMA : CONFIGS AND SCRIPTING (addons)
    Replies: 2
    Last Post: Apr 28 2008, 19:23
  4. New natural enviroment
    By CuteQA in forum ARMA 2 & OA - SUGGESTIONS
    Replies: 19
    Last Post: Jan 2 2004, 10:07
  5. New enviroment report
    By Akira in forum OFFTOPIC
    Replies: 10
    Last Post: Jun 4 2002, 14:46

Posting Permissions

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