Results 1 to 4 of 4

Thread: rGlobalChat with Multiplayer Network

  1. #1

    rGlobalChat and Multiplayer Network

    Hello. Can't get hang of it, i'm checking through all vehicle crew and want to display something into their global chat.

    PHP Code:
    {
        [
    nil_x"loc"rGlobalChat"Some message"call RE;
    } forEach (
    crew someVehicleVar); 
    And it doesn't work. Help please?
    Last edited by SaMatra; Aug 12 2012 at 15:06.

  2. #2
    vehicle is the name of a command not a variable. You need something after like:
    Code:
     (crew vehicle myVehicleOrUnit)

    Hmm try swapping nil and _x. You do have the functions module inserted on the map right?

  3. #3
    Staff Sergeant SaMatra's Avatar
    Join Date
    Jul 17 2011
    Location
    Russia
    Posts
    330
    Author of the Thread
    Oh its not really a "vehicle" there, just replaced actual variable with it here on forums. If I swap _x and nil, then everyone sees global chat message instead of just people inside
    Last edited by SaMatra; Aug 12 2012 at 15:05.

  4. #4
    Quote Originally Posted by SaMatra View Post
    Oh its not really a "vehicle" there, just replaced actual variable with it here on forums. If I swap _x and nil, then everyone sees global chat message instead of just people inside
    Hmm think you actually need to use _x both places instead. The first is who says the message, the second is on what machine that should happen. So my guess is that:
    Code:
    [nil, _x, "loc", rGlobalChat, "Some message"] call RE;
    Doesn't work because it ends up something like: nil globalChat "Some Message";
    And
    Code:
    [_x, nil, "loc", rGlobalChat, "Some message"] call RE;
    doesn't work because the "local object" is nil it just ignores and does it for everybody.
    So try:
    Code:
    [_x, _x, "loc", rGlobalChat, "Some message"] call RE;
    Another issue if there are AI's in the game you may want to filter away those. Otherwise if you for instance the host is also playing (not a dedicated) and there are say 3 AI's in the vehicle he will see the message 3 times. So you can filter way AI's like this:
    Code:
    //Assume the vehice in question is _vehicle;
    _toChatTo = [];
    {
        if (isPlayer _x) then {
            _toChatTo set [count _toChatTo, _x];
        };
    } forEach (crew _vehicle);
    
    {
        [_x, _x, "loc", rGlobalChat, "Some message"] call RE;
    } forEach _toChatTo;

Similar Threads

  1. ArmA Network
    By Madus_Maximus in forum ARMA - GENERAL
    Replies: 3
    Last Post: Feb 16 2009, 21:07
  2. Network problems
    By m0nkm0nk in forum ARMA - TROUBLESHOOTING
    Replies: 10
    Last Post: Jun 7 2007, 06:40
  3. Multicasting Network
    By CrashDome in forum ARMA - MULTIPLAYER
    Replies: 12
    Last Post: Mar 26 2007, 18:22
  4. New name for network
    By blackdog~ in forum OFFTOPIC
    Replies: 11
    Last Post: Dec 3 2003, 14:30
  5. I need an network master to help
    By VIPER2001 in forum TROUBLESHOOTING
    Replies: 5
    Last Post: Mar 18 2002, 15:23

Posting Permissions

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