BlackGeorge meanings and thoughts
|
|
gyuri004magyar | Дата: Ср, 2022-Июл-13, 19:24 | Сообщение # 46 |
Hungarian artillerist/inspector/tactic
Группа: Друзья
Сообщений: 32
Статус: Offline
| I read codes but dont understand why need to use them. Why need to do smt with server when the code runing on the server? When player take a point in the game will activate a sqs script and after that the player will get that commands.If not,then why not? I not need commands.I need to understand why need to use this codes and set eventhandlers and thisselect things. Why better this selec1 is name player,this select 0 is nothing /then /_name=name player and if smt canged i just write _name=""..... Why need to use msg_info = ["msg","gyuri","He gyuri, I follow you everywhere!"]; // [_command_name, _player_name,_msg_itself] publicVariable "msg_info"; ? Why not enough i set a part in the script with simple hint and when player activate that he will see.If no,than why not? I hope yiu understand my problem and maybe you dont know the answers all my question but i dont find any other teacher in this problem.
When you write to your init.sqf:player exec "gyurimission.sqs" than than will runing when server os inline. When the player take a point where that sqs starting,then the command will be working for the player when he is near the right place. If not,than why not?
Anyway just need to definie who is player and how many player play that mission. Definie hints and end parts.
I cant test(or i can,but i wont build up now my second pc to create the server) but last night i used: _hehe=player
not alive hehe goto "end"
So i can do playable parts in my mission,player1,player2.....or just call their ID and after that use that.I read about many ways but still dont understand why need to use that things what you wrote.
Or maybe we talk about same things just i thinking in sqs form hmm.
You use
if {not alive player} exitwhit {blabla@} Here i dont know how wait in this position
i use
#start ? (not alive player): goto "blabla@" goto start
(somewhere in the script i definie)
#blabla@
hint "mission is over"
But i edit last things and you will see what need to change will be playable in multy......
Сообщение отредактировал gyuri004magyar - Ср, 2022-Июл-13, 20:20 |
|
| |
Engineer | Дата: Ср, 2022-Июл-13, 23:39 | Сообщение # 47 |
Главный инженер острова
Группа: Администраторы
Сообщений: 110
Статус: Offline
| Look on it, try it. But you need dedicated server . You can run your dedicated server on the same computer and connect/disconnect to it with the same or different names, so you emulate the same/different players
Your little MP mission with info exhange server<->client
|
|
| |
Engineer | Дата: Ср, 2022-Июл-13, 23:49 | Сообщение # 48 |
Главный инженер острова
Группа: Администраторы
Сообщений: 110
Статус: Offline
| Цитата gyuri004magyar ( ) Why need to do smt with server when the code runing on the server? You need to exchange info between server<-> client bcs server knows nothing about what code on client is doing. So: 1. You connect to the dedicated server (or server on other client it is the same from your point of view) and use command on some vehcile/item. E.g. use command on base flag "parajump". 2. Such command may be assigned to the flag pole ONLY on client, not on server!!! Server not knows what command you add to flag and what command you used on it. 3. You want to stop parajump for all player during 5 minutes after occured parajump!!! How to do it? Only by sending info to ALL other clients!!! So you need to know how to send info)))
|
|
| |
gyuri004magyar | Дата: Чт, 2022-Июл-14, 00:23 | Сообщение # 49 |
Hungarian artillerist/inspector/tactic
Группа: Друзья
Сообщений: 32
Статус: Offline
| The mission folder. Before you read a code just try it to play. Tested but not completed bcs just demo to you and some trash data in code but important to me....... Tested in MP not SM.But in this case works in SM too. Hope you like and wan to more https://u.to/5lw3HAДобавлено (2022-Июл-14, 00:25) ---------------------------------------------
Цитата Engineer ( ) Look on it, try it. But you need dedicated server . You can run your dedicated server on the same computer and connect/disconnect to it with the same or different names, so you emulate the same/different playersYour little MP mission with info exhange server<->client Tomorrow will check
Сообщение отредактировал gyuri004magyar - Чт, 2022-Июл-14, 00:24 |
|
| |
Engineer | Дата: Чт, 2022-Июл-14, 01:07 | Сообщение # 50 |
Главный инженер острова
Группа: Администраторы
Сообщений: 110
Статус: Offline
| Цитата Why not enough i set a part in the script with simple hint and when player activate that he will see.If no,than why not? Bcs you print your hint only ON one client! You cant set hint on dedicated server, he is headless))) Of course you can code "hint blablabla" on MP server, but nothing will occure!!!
To show this hint on ALL connected clients you should send this message to all clients, or start the same script on all clients that will print it etc. Each client will recive this message/info package and - show hint on each client!
Using publicVariable on one of clients or on the server itself, and with this run before assigned addPublicVariableEventHandler to execute some code, you can reach this (that is to show the same hint) in MP environment!
Now you have working MP mission and we can use it as test one to show answers to all of your future questions.
|
|
| |
Engineer | Дата: Чт, 2022-Июл-14, 01:14 | Сообщение # 51 |
Главный инженер острова
Группа: Администраторы
Сообщений: 110
Статус: Offline
| What about dedicated server to run? 1. Set your Arma-1 start label for the special bat file as follows (my example): E:\Bin\ArmA\srvBGMP.bat 2. BGMP.bat in Arma root directoryt:
Код @echo off
copy /y NUL "C:\Users\Sygsky\AppData\Local\ArmA\arma.RPT" copy /y NUL "C:\Users\Sygsky\Documents\ArmA\arma_server.RPT"
start "" "E:\Bin\ArmA\arma_server.exe" -port=2402 -config=srvBGMP.cfg -maxmem=768 -mod=@ACE -profiles=c:\Users\Sygsky\Documents\ARMA\ -name=server -pid=pids.log -ranking=e:\Bin\ArmA\ranking.log
May be you will need some profile settings but all should work without them, in some default mode. Also note the port setting to connect with a server: 2402, not regular 2302. It is done so that you not intersect with ordinal arma settigs. 3. srvBGMP.cfg. Also must be in root Arma directory.
Сообщение отредактировал Engineer - Вс, 2022-Июл-17, 22:27 |
|
| |
Engineer | Дата: Чт, 2022-Июл-14, 01:16 | Сообщение # 52 |
Главный инженер острова
Группа: Администраторы
Сообщений: 110
Статус: Offline
| That is all. Replace my Arma root directory (E:\Bin\ArmA\) and my user path (\Sygsky)with your one and... Run your label with corrected files content and get server window :
Connect to it as you wish and when you wish. Server will wait for you.
|
|
| |
Engineer | Дата: Чт, 2022-Июл-14, 09:22 | Сообщение # 53 |
Главный инженер острова
Группа: Администраторы
Сообщений: 110
Статус: Offline
| Well, I'll try it this evening.
Цитата gyuri004magyar ( ) The mission folder. Before you read a code just try it to play. Tested but not completed bcs just demo to you and some trash data in code but important to me....... Tested in MP not SM.But in this case works in SM too. Hope you like and wan to more https://u.to/5lw3HA
|
|
| |
Engineer | Дата: Чт, 2022-Июл-14, 16:38 | Сообщение # 54 |
Главный инженер острова
Группа: Администраторы
Сообщений: 110
Статус: Offline
| In test mission the client activity is demostrated. 1. Start dedicated server. 2. Start client and connect to the server on port 2402. 3.Come to flag and execute the command "Run mission #1". After it you are the owner of the mission #1. Nobody else can call this mission again. If you re-call it, you are informed that you are already running this mission. 4.Exit from client and reconnect to the server. Again try to run command "Run mission #1". And you again are known as owner of the mission.
May be you need functionality to stop running mission? For example, stop mission on your death or to add some special command "Stop mission #1"? If yes, it is easy to add.
To stop on death we should to use event "killed", and in code for event we should to write.: Код mission1Player = objNull; publicVariable "mission1Player";
. To stop on some command, call new script file, e.g. "stop.sqf" with the same code as on ''killed" event.
I will add this code to the mission texts soon.
It is a pity, but you can't connect with 2+ clients started from the same computer to the one server. As server checks if client has unique disk id on installation.
|
|
| |
Engineer | Дата: Пт, 2022-Июл-15, 16:02 | Сообщение # 55 |
Главный инженер острова
Группа: Администраторы
Сообщений: 110
Статус: Offline
| Well, I started your new mission from the client in MPMissios folder. It was started. After 2 messages on airbase (near Wallmap object) I'm standing here wondering how to reach the Asharan? Going there on foot and then swimming for kilometres is definitely not the author's intention)))
|
|
| |
gyuri004magyar | Дата: Пт, 2022-Июл-15, 18:41 | Сообщение # 56 |
Hungarian artillerist/inspector/tactic
Группа: Друзья
Сообщений: 32
Статус: Offline
| I didnt add anything bcs that is not from this mission. Sure you can add a heli to travel Now i understand why i have to use multy codes. Thanks your mission. I reading about multy commands at the next days.
Сообщение отредактировал gyuri004magyar - Пт, 2022-Июл-15, 19:10 |
|
| |
Engineer | Дата: Пт, 2022-Июл-15, 19:17 | Сообщение # 57 |
Главный инженер острова
Группа: Администраторы
Сообщений: 110
Статус: Offline
| Цитата gyuri004magyar ( ) Sure you can add a heli to travel Of course! But I was dreaming about your bright scenario)))))
|
|
| |
Engineer | Дата: Пт, 2022-Июл-15, 19:31 | Сообщение # 58 |
Главный инженер острова
Группа: Администраторы
Сообщений: 110
Статус: Offline
| Цитата gyuri004magyar ( ) Now i understand why i have to use multy codes. A good achievment, BG! Now you can answer to anybody that you know what is a multi-tasking technology))) They like to ask this question on interviews! Today I will add slightly better code for BGMP.Sara. It is able to store your status between sessions. Very usefull feature. Maybe I'll have time to add the processing of a player's death ("killed" event) processing for mission #1 runner. So mission may be stopped by two means only: 1. If mission #1 running player is killed 2. Player himself call "Stop mission" command on the flag. If player leave the game, it will not stop the mission. Of course it is not very realistic logically, and should only be used when teaching)) As if running player leave game forever, nobody can re-use this misiion by any mean(((
Next step will be the ability to send messages to ALL player simultaneously from any mission part, server and/or client independently.
The best code to study multi-payer in Arna-1 is our missioon, of course. But it is very-very big project and its code is not very clean and beautiful in all parts.
|
|
| |
gyuri004magyar | Дата: Пт, 2022-Июл-15, 21:49 | Сообщение # 59 |
Hungarian artillerist/inspector/tactic
Группа: Друзья
Сообщений: 32
Статус: Offline
| Every thing what you write to me will be good. I want to coding/definie/separate every player who accept the mission. Logicaly:Mission start-wait x time to able join other player-mission start and sincronized every player your server code not too difficult.Just very undispozed and templated.Cutted too many script parts.....or just i feel this. Now i dont know all of multy commands but i understand why they need and when i read the code i can follow the lines. It is again a good station before i can make my dream things.
Anyhow when i practicse things i try to do usefull parts to you. For exaple i dont forget my Maz truck, just i need to know about more in script and modelling.LAst time i understand more when i created that kazamatas and now i know more when i edited this mission.Multy part will be good when i edit would draft a final summary. That mission what you tired not completed.Just a logical prologue.ANyway can you finish,take round9? Understand what you can to do ? And what you cant to do when miss something?
I dont know why but i like editing more than playing.MAybe bcs super AI skllis.... when AI shot 1 bullet from 2 km and i start to bleed and cant do anything
In a future if not secret maybe you can share with me the version of current server mission,because i just have an older where DOSAFF is not exist.Now i want to separate your mission codes and things.......maybe i will find smt usefull to me.
|
|
| |
Engineer | Дата: Сб, 2022-Июл-16, 01:57 | Сообщение # 60 |
Главный инженер острова
Группа: Администраторы
Сообщений: 110
Статус: Offline
| Цитата gyuri004magyar ( ) In a future if not secret maybe you can share with me the version of current server mission,because i just have an older where DOSAFF is not exist.Now i want to separate your mission codes and things.......maybe i will find smt usefull to me. Of course it is not secret at all. Use it in any direction you need. Really on each time you connect, you recieved newest version of the mission as PBO file. So you only need to find it onto your disks. On my Win 7 it is situated as __cur_mp.pbo at the path "C:\Users\Sygsky\Documents\ArmA\tmp\__cur_mp.pbo" . Hope you already have the UnPBO tools. I use one plugin (ofppbo) for the Total Commander. It makes pack/unpack procedures for any archive format so easy as if I work with file system files, not archive parts. But it is matter of taste of course.
Also I added promised features to the demo MP missions, so mission #1 is stopped on player death and on call "stop mission #1" command at flag. But dead body still remains after death, will check them later.
Download new version of BGMP from yandex.disk.
|
|
| |