unidad2pete
Member-
Content Count
74 -
Joined
-
Last visited
-
Medals
Everything posted by unidad2pete
-
I just finished a mission, and everything works fine. The problem I have is that after some time everyone has LAG. When there are 15 players on the server, the LAG appears after 1 hour or so. But when there are 60 people on the server LAG appears after 10 minutes. What are the main causes of LAG in multiplayer missions? This is my first big mission, I am newbie. The mission has many variables, and loops (While {true} do {etc.}). Also when someone dies, it leaves a briefcase on the floor, so you catch the players and everything is full of briefcases. It has a ranking system, experience, money and a lot of things, but in theory everything works fine. Please I need help, I've been working on this mission very long time and makes it unplayable LAG. The LAG disappears when I restart the mission and depending on the players appears before or after. Is not Graphic LAG, is connection LAG. If anyone can take a look at my mission I would be extremely grateful. Or any kind of help. Thank you all.
-
My mission have LAG :(
unidad2pete replied to unidad2pete's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks to you I managed to remove my mission LAG. Everything works correctly. Especially thanks to kylania .;);):D:D:D:D:D:D:D -
My mission have LAG :(
unidad2pete replied to unidad2pete's topic in ARMA 3 - MISSION EDITING & SCRIPTING
After reading everything with my low level of English, I understand that I have to optimize the code a lot. I have 2 easy questions Is there any difference affecting LAG between CASE 3 A and CASE 3 B? which is better in next cases? CASE 1 A: if (( _a == 0 ) and ( _b == 0 ) and ( _c == 0 )) then {something}; B: if ( _a == 0 ) then { if ( _b == 0 ) then { if ( _c == 0 ) then { something; }; }; }; CASE 2 A: While {true} do { if ( player hasWeapon "Weaponclass" ) then { player removeWeapon "Weaponclass" }; sleep 10; }; B: Trigger ( anybody, repeatedly, game logic ) condition: player hasWeapon "Weaponclass"; onAct : player removeWeapon "Weaponclass"; CASE 3: A: if ( _a == 0 ) then { if ( _b == 0 ) then { if ( _c == 0 ) then { something; }; }; }; B: if ( _a == 0 ) then {if ( _b == 0 ) then {if ( _c == 0 ) then {something;};};}; -
My mission have LAG :(
unidad2pete replied to unidad2pete's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If I use triggers instead of measuring distances with the command "while" and distance "would help? Would cause LAG if I put many Triggers?? Also I use eventhandler MPkilled MP. I do not understand is that when I look at other scripts Wasteland, etc ... seem much larger, with many whiles and other things and do not cause lag. -
My mission have LAG :(
unidad2pete replied to unidad2pete's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This are two scripts examples. This is called via init.sqf, is a loop of player, set fatigue 0 if variable fati is 1, measuring the distance with marker and more things. if (player == player) then { While {true} do { if (fati == 1) then { player setFatigue 0; }; _posi = player distance getMarkerPos "colorzone"; if (_posi > 300) then { experiencia = experiencia + 1; }; if (_posi <= 300) then { experiencia = experiencia + 11; euros = euros + 30; }; //* Comprobando nivel y otorgando mejoras *// if ((nivel == 1) and (nivel == 1)) then {nextlevelexp = 840}; if ((nivel == 2) and (nivel == 2)) then {nextlevelexp = 1200}; if ((nivel == 3) and (nivel == 3)) then {nextlevelexp = 1560}; if ((nivel >= 4) and (nivel <= 6)) then {nextlevelexp = 2160}; if ((nivel >= 7) and (nivel <= 10)) then {nextlevelexp = 3100}; if ((nivel >= 11) and (nivel <= 14)) then {nextlevelexp = 4700}; if ((nivel >= 15) and (nivel <= 18)) then {nextlevelexp = 6000}; if ((nivel >= 19) and (nivel <= 25)) then {nextlevelexp = 9000}; if ((nivel >= 26) and (nivel <= 31)) then {nextlevelexp = 13000}; if ((nivel >= 32) and (nivel <= 37)) then {nextlevelexp = 19000}; if ((nivel >= 38) and (nivel <= 45)) then {nextlevelexp = 26000}; if ((nivel >= 46) and (nivel <= 50)) then {nextlevelexp = 48000}; if (nivel >= 50) then {nextlevelexp = 10000000}; if ( experiencia >= nextlevelexp) then { nivel = nivel + 1; experiencia = 0; playSound "trompetas"; _text4 = format["Rank up!! n/You are rank %1 now!!", nivel]; titleText [_text4,"PLAIN", 1]; titleFadeOut 15; }; { clearItemCargoGlobal _x; clearBackpackCargoGlobal _x; clearMagazineCargoGlobal _x; clearWeaponCargoGlobal _x;} ForEach allMissionObjects "All"; sleep 5; }; }; This is not my script, but I modified very much to adecuate to my mission. Check variable when people enter on car and depending variable, eject or not. while {nivel < 50} do { waitUntil {sleep 0.5; alive player}; private "_v"; while {((alive player) and (nivel >= 1) and (nivel < 3))} do { _firstlvl = nivel; waitUntil {sleep 0.5; vehicle player != player}; _newlvl = nivel; if (_firstlvl != _newlvl) exitWith {}; _v = vehicle player; _v1 = typeOf _v; if !(_v1 in Disponible_1) then { if ((driver _v == player) or (gunner _v == player) or (_v turretUnit [0] == player) or (_v turretUnit [1] == player) or (_v turretUnit [2] == player))then { player action ["eject", _v]; waitUntil {sleep 0.5; vehicle player == player}; player action ["engineOff", _v]; titleText ["Insufficient rank to use that vehicle position","PLAIN", 1]; titleFadeOut 5; }; }; }; while {((alive player) and (nivel >= 3) and (nivel < 5))} do { _firstlvl = nivel; waitUntil {sleep 0.5; vehicle player != player}; _newlvl = nivel; if (_firstlvl != _newlvl) exitWith {}; _v = vehicle player; _v1 = typeOf _v; if !(_v1 in Disponible_3) then { if ((driver _v == player) or (gunner _v == player) or (_v turretUnit [0] == player) or (_v turretUnit [1] == player) or (_v turretUnit [2] == player)) then { player action ["eject", _v]; waitUntil {sleep 0.5; vehicle player == player}; player action ["engineOff", _v]; titleText ["Insufficient rank to use that vehicle position","PLAIN", 1]; titleFadeOut 5; }; }; }; while {((alive player) and (nivel >= 5) and (nivel < 9))} do { _firstlvl = nivel; waitUntil {sleep 0.5; vehicle player != player}; _newlvl = nivel; if (_firstlvl != _newlvl) exitWith {}; _v = vehicle player; _v1 = typeOf _v; if !(_v1 in Disponible_3) then { if (driver _v == player) then { player action ["eject", _v]; waitUntil {sleep 0.5; vehicle player == player}; player action ["engineOff", _v]; titleText ["Insufficient rank to use that vehicle position","PLAIN", 1]; titleFadeOut 5; }; }; }; while {((alive player) and (nivel >= 9) and (nivel < 11))} do { _firstlvl = nivel; waitUntil {sleep 0.5; vehicle player != player}; _newlvl = nivel; if (_firstlvl != _newlvl) exitWith {}; _v = vehicle player; _v1 = typeOf _v; if !(_v1 in Disponible_9) then { if (driver _v == player) then { player action ["eject", _v]; waitUntil {sleep 0.5; vehicle player == player}; player action ["engineOff", _v]; titleText ["Insufficient rank to use that vehicle position","PLAIN", 1]; titleFadeOut 5; }; }; }; while {((alive player) and (nivel >= 11) and (nivel < 20))} do { _firstlvl = nivel; waitUntil {sleep 0.5; vehicle player != player}; _newlvl = nivel; if (_firstlvl != _newlvl) exitWith {}; _v = vehicle player; _v1 = typeOf _v; if !(_v1 in Disponible_11) then { if (driver _v == player) then { player action ["eject", _v]; waitUntil {sleep 0.5; vehicle player == player}; player action ["engineOff", _v]; titleText ["Insufficient rank to use that vehicle position","PLAIN", 1]; titleFadeOut 5; }; }; }; while {((alive player) and (nivel >= 20) and (nivel < 26))} do { _firstlvl = nivel; waitUntil {sleep 0.5; vehicle player != player}; _newlvl = nivel; if (_firstlvl != _newlvl) exitWith {}; _v = vehicle player; _v1 = typeOf _v; if !(_v1 in Disponible_20) then { if (driver _v == player) then { player action ["eject", _v]; waitUntil {sleep 0.5; vehicle player == player}; player action ["engineOff", _v]; titleText ["Insufficient rank to use that vehicle position","PLAIN", 1]; titleFadeOut 5; }; }; }; while {((alive player) and (nivel >= 26) and (nivel < 35))} do { _firstlvl = nivel; waitUntil {sleep 0.5; vehicle player != player}; _newlvl = nivel; if (_firstlvl != _newlvl) exitWith {}; _v = vehicle player; _v1 = typeOf _v; if !(_v1 in Disponible_26) then { if (driver _v == player) then { player action ["eject", _v]; waitUntil {sleep 0.5; vehicle player == player}; player action ["engineOff", _v]; titleText ["Insufficient rank to use that vehicle position","PLAIN", 1]; titleFadeOut 5; }; }; }; while {((alive player) and (nivel >= 35) and (nivel < 45))} do { _firstlvl = nivel; waitUntil {sleep 0.5; vehicle player != player}; _newlvl = nivel; if (_firstlvl != _newlvl) exitWith {}; _v = vehicle player; _v1 = typeOf _v; if !(_v1 in Disponible_35) then { if (driver _v == player) then { player action ["eject", _v]; waitUntil {sleep 0.5; vehicle player == player}; player action ["engineOff", _v]; titleText ["Insufficient rank to use that vehicle position","PLAIN", 1]; titleFadeOut 5; }; }; }; while {((alive player) and (nivel >= 45) and (nivel < 50))} do { _firstlvl = nivel; waitUntil {sleep 0.5; vehicle player != player}; _newlvl = nivel; if (_firstlvl != _newlvl) exitWith {}; _v = vehicle player; _v1 = typeOf _v; if !(_v1 in Disponible_45) then { if (driver _v == player) then { player action ["eject", _v]; waitUntil {sleep 0.5; vehicle player == player}; player action ["engineOff", _v]; titleText ["Insufficient rank to use that vehicle position","PLAIN", 1]; titleFadeOut 5; }; }; }; }; If I remove all the loops, solve the problem? -
MCC Sandbox 3 - Dynamic mission creating tool for ArmA 3
unidad2pete replied to shay_gman's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Hi all; I have succeeded in installing and test the 3d editor, but do not understand how I can incorporate objects creations from editor to my mission, could someone please explain how to do it? thankyou -
How to make a private pbo?
unidad2pete replied to unidad2pete's topic in ARMA 3 - MISSION EDITING & SCRIPTING
fail, wrong post. -
Hi; I have a mission with level system and an economic system and I use "saveProfileNamespace" to save variables to disconnect. I do not want someone to download the mission, change variables and save his variables to cheat. This could fix if nobody can open and edit the mission. How I can get it? A greeting and thanks
-
texture load only when player is near
unidad2pete posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
HI; I got object texture. helpers / user Texture 1 m. On init I put: this setObjectTexture [0, "images\MYTEXTURE.jpg"]; Works fine, but texture only load when I very near of object. How I can do to load the texture from far away? Thx all. -
BIS_fnc_MP target and isPersistent parameter
unidad2pete replied to Johnson11B2P's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This sample command does not work if you do not specify the function fnc_addAction in some place. If you explain in more detail what you want I can teach you how to do it and explain the commands -
BIS_fnc_MP target and isPersistent parameter
unidad2pete replied to Johnson11B2P's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You could do that by changing addAction, also change a variable, then that player connects, check that variable and add the action related to that variable. I do not know if I'm explaining it right -
texture load only when player is near
unidad2pete replied to unidad2pete's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've tried but it is not 100% reliable and I prefer to do it another way. If there is no way I will have to do so. Thx for repply -
How to make a private pbo?
unidad2pete replied to unidad2pete's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank for reply LooneyWarrior. How I can do to save variables to the server? Variables would lose when the server is restarted? -
Playable units coverting in bots after has been played
unidad2pete replied to unidad2pete's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I Understand :) Thank you kylana, your always great -
Playable units coverting in bots after has been played
unidad2pete posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi; When mission starts, no problem, but after restart mission, all playable units are converting in bots with name of last player controled. In description.ext i get disabledAI = 1; Should not this command to fix the problem? -
MCC Sandbox 3 - Dynamic mission creating tool for ArmA 3
unidad2pete replied to shay_gman's topic in ARMA 3 - ADDONS & MODS: COMPLETE
What is CBA? -
MCC Sandbox 3 - Dynamic mission creating tool for ArmA 3
unidad2pete replied to shay_gman's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Hi, I can not see action to access the menu. I put @ mcc_sandbox in C: \ Program Files (x86) \ Steam \ SteamApps \ common \ Arma 3 Start Arma 3, activate mod and restart Arma 3. In theory should have the action in each unit, right? I open the mission editor, open a mission, preview and no action appears. What am I doing wrong? -
How to display the player a server variable by titleRsc?
unidad2pete posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello; I just learned a little about titleRsc. I can display text using this code in description.ext class RscText { access = 0; type = CT_STATIC; idc = -1; style = ST_LEFT; w = 0.1; h = 0.05; font = "puristaMedium"; sizeEx = 0.04; colorBackground[] = {0,0,0,0}; colorText[] = {0,0,0,1}; text = ""; fixedWidth = 0; shadow = 0; }; class RscTitles { titles[] = {MYTITLE}; // optional class MYTITLE { idd = -1; movingEnable = false; duration = 90000; fadein = 0; name = "MYTITLEl"; controls[] = {"HelloWorld"}; class HelloWorld: RscText { x = 0; y = 0; w = 1; h = 1; text = "Hello World"; }; }; }; I show " Hello World" permanently on screen or other text in text = " TEXT HERE "; when i call with titleRsc ["MYTITLE", "PLAIN", 1]; But I do not get how to display a variable of server through RscText. Init.sqf if (isDedicated) then { scoreweast = 0; scoreeast = 0; }; Currently I show these variables (scoreweast and scoreeast) by a permanent hint. I want to show these variables in RscText. What is I have to put in text = "Hello World" to show the variables? I appreciate a lot your help. -
How to display the player a server variable by titleRsc?
unidad2pete replied to unidad2pete's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Uff ... I am a little noob. Not fully understand English, and I can not understand how to do it with explanations of wiki. I have tried to understand looking at your mission, but is a little big for my knowledge. Could you tell me where I can find the code in your mission, and how it works? I have seen 1521 cutRsc ["OSD","PLAIN"]; in init.sqf. But I can not understand what happens when I see osd.hpp -
Hello; I need your help again. As I can do, to display an image on the screen without affecting the gameplay? I only get to create an image where I take control of the mouse cursor and I have to press escape or create a button to close the dialog. I want to create the image without displaying the mouse cursor and can not interact. This is my script: description.ext #include "showimage.hpp" showimage.hpp class Imageshow { idd = -1; movingEnable = false; enableSimulation = true; controlsBackground[] = {}; controls[] = {"Imageshowlogo"}; objects[] = {}; disableEscapeClosing = 1; class Imageshowlogo { idc = -1; type = 0; style = 48; moving = false; font = "puristaMedium"; x = 0; y = 0; h = 0.1; w = 0.1; sizeEx = 0.025; action = "" text = "mypicture.jpg"; colorText[] = {1,1,1,1}; colorFocused[] = {0,0,0,1}; colorShadow[] = {0.8,0.8,0.8,1}; colorBorder[] = {0.5,0.5,0.5,1}; colorBackground[] = {0,0,0,1}; colorBackgroundActive[] = {1,0,0,1}; colorDisabled[] = {1,0,0,1}; colorBackgroundDisabled[] = {0.5,0.5,0.5,1}; borderSize = 0; offsetX = 0; offsetY = 0; offsetPressedX = 0; offsetPressedY = 0.002; soundEnter[] = {"",0,1}; soundPush[] = {"",0,1}; soundClick[] = {"",0,1}; soundEscape[] = {"",0,1}; }; }; I call image with _imageshow = createDialog "Imageshow"; What I have to do? Thank you for help!!
-
Ok, thank you , is perfect!! I did not know that type of command. Kylania, if you want to Have the image forever, you can adjust the length to a high number. duration = 90000; That would make the image to remain 25 hours Thank you all!!
-
I apologize for this, but I need help really, this can not be that hard, I just want to add an image permanently. Sorry spam :(
-
Yes, problem is parachutes !! thx for info.
-
I do not know why crash my server when are about 10 players. I'm no professional scripter and this is my first multiplayer mission I do from the beginning. Scripts are very simple, I do not understand why error happens. On the map there are many vehicles, about 200, may be the reason? I enclose Mission for if anyone can take a look to see what is wrong. https://mega.co.nz/#!E84AhSTQ!FyN5rD6RVpGzSxkK25gUSVxROGE9jglPrhzzicNkom4 loopcontrol1.sqf It is the script that measures the distance of the player and marker, count team players and change the color mark and adds points to the team that controls the area. called on init.sqf, only dedicated. loopmarker.sqf Change marker each 20 minutes to other position. called on init.sqf, only dedicated. randomspawn.sqf It is the script that sends the player to a random position on the map, at 1500 meters high, addparachute and action to player Virtual Amo. It is activated via a trigger located in the respawn of players. VAS : http://www.armaholic.com/page.php?id=19134 Others folders are for vehicles spawn. Marketers call these scripts. I know I'm asking much but I really appreciate it your help, I do not know what is wrong
-
Hello; *** I have a problem with the hint. I have a variable for each team. This variable adds points to the team with an area under control. With the command "if (! IsServer) exitWith {}," I get to be the server that is responsible for doing the work. My problem is that when you display a hint with the points of each team, the message is not shown to players on a dedicated server. Init.sqf: if (! IsServer) exitWith {}; _null = [] execVM "loopcontrol.sqf"; scorewest = 0; scoreeast = 0; scoreguer = 0; loopcontrol.sqf: While {true} do { if (MY CONDITION) then {scorewest = scorewest +1;}; if (MY CONDITION2) then {scoreeast = scoreeast +1;}; if (MY CONDITION3) then {scoreguer = scoreguer +1;}; scorewest _scorew = str; scoreeast _scoree = str; scoreguer _scoreg = str; _scorewp = "BLUFOR =" + _scorew; _scoreep = "OPFOR =" + _scoree; _scoregp = "INDEPENDENT =" + _scoreg; _text = composeText [_scorewp, lineBreak, _scoreep, lineBreak, _scoregp]; hint _text; sleep 5; }; By this, I display a constantly hint showing points each team that count the server. But it only works on a local server. In multiplayer does not display the message. You can you help me with my problem? I do not know if I and explained well, sorry for my English.