Jump to content

Search the Community

Showing results for tags 'eai'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • ARMA 3
    • DAYZ
    • TAKE ON MARS
    • ARMA 2
    • ARGO
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
  • OTHER BOHEMIA GAMES
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Die Hard OFP Lovers' Club's Topics
  • Japan in Arma's Topics

XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 1 result

  1. Bus message exchange Lastest version: 2.1 by Code34 Description OO BME is a class (object oriented) that permits to build a main BUS messages between clients & server and transfert data between clients & server. Like to Donate ? Donate with paypal Github: https://github.com/code34/bus_message_exchange2.altis Reference: http://forums.bistudio.com/showthread.php?167980-Object-Oriented-SQF-Scripting-and-Compiling Features: - build one main bus message - Works in local & MP - rewrite of BME 1.0 in OO way - Asynchronous remote execution - Synchronous remote execution Licence: Under Gpl, you can share, modify, distribute this script but don't remove the licence and the name of the original author Documentation: /* Author: code34 nicolas_boiteux@yahoo.fr Copyright (C) 2016-2018 Nicolas BOITEUX CLASS OO_BME This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* Function: _bme = "new" call OO_BME; Create a new bme object (require to create at same time a handler) */ /* Function : ["remoteCall", ["remotefunction", data, "target", targetid, defaultreturn, releasetime ]] call global_bme; @remotefunction is a string declare in clienthandler or serverhandler file @data paramters of remotefunction @target is a string "client" or "server") declare the target where the remote function will be exectued @targetid clientid of the target @defaultreturn : default return if no return of target @releasetime: limit of time to wait for an answer of target */ /* Function : ["remoteSpawn", ["remotefunction", data, "target", playerid]] call global_bme; @remotefunction is a string declare in clienthandler or serverhandler file @data paramters of remotefunction @target is a string ("client" or "server" or "all") declare the target where the remote function will be exectued @playerid (optionnal) is a scalar defined by the player id where the code should be executed */ How to declare remote functions =========================== You have to declare your remote functions as handlers. There is tow kinds of handlers - server handlers - client handlers The handler declaration must respect this syntax, and use those prefix: BME_netcode_server_remotefunction = { code to execute on server side }; BME_netcode_remotefunction = { code to execute on client side }; You can declare thoses handlers directly on your code, but it's more simple to use the default location: client side: - declare by default in BME_clienthandler.sqf server side: - declare by default in BME_serverhandler.sqf Readme: /* Author: code34 nicolas_boiteux@yahoo.fr Copyright (C) 2013-2018 Nicolas BOITEUX Bus Message Exchange2 (BME) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ Create a main bus message between clients & server Usage: put this code into your mission init.sqf call compilefinal preprocessFileLineNumbers "oo_bme.sqf"; call compilefinal preprocessFile "BME_clienthandler.sqf"; call compilefinal preprocessFile "BME_serverhandler.sqf"; See example mission in directory: bus_exchange_message.Altis Licence: You can share, modify, distribute this script but don't remove the licence and the name of the original author logs: 2.0 - first implementation Examples call compile preprocessFileLineNumbers "oo_bme.sqf"; call compile preprocessFile "BME_clienthandler.sqf"; call compile preprocessFile "BME_serverhandler.sqf"; sleep 2; global_bme = "new" call OO_BME; if(local player) then { [] spawn { while {true} do { _result= ["remoteCall", ["getServerName", name player, "server"]] call global_bme; hint format ["RemoteCall: %1", _result]; sleep 2; }; }; }; if(local player) then { [] spawn { while {true} do { _message = "hello server, message send from client"; ["remoteSpawn", ["hint", _message, "server"]] call global_bme; sleep 2; }; }; }; if(isserver) then { while {true} do { _message = "hello client, message send from server"; ["remoteSpawn", ["hint", _message, "client"]] call global_bme; sleep 2; }; };
×