Jump to content

redburn

Member
  • Content Count

    72
  • Joined

  • Last visited

  • Medals

Everything posted by redburn

  1. Hello guys, written this:, { _x addEventHandler ["Fired", { if(side player == west) then { a1 setCaptive false; } else { a2 setCaptive false; } }]; } foreach allUnits; does nothing because I do not want all players to go from false to true when activating the event. How can I make a player pass to true, but not to others?
  2. Thank you! I'll be testing it and then I'll tell you!
  3. Well, look, I'm doing a mission where there will be two groups of players, Put it this way, one team of players will be group A1 and another team of players will be group A2, one of the two groups (who do not know which group they want to be) will go undercover to one base, while the other group will also go to another. What I do not want is that if the group of players A1 open fire against some enemy, that the group A2 does not receive fire from the enemy for that, if it did not open fire. Thanks man, I'll be testing and then I'll tell you!
  4. yes, but in this case, what I would like to do is: make two groups of players, one of the groups shoots out of the enemies, the event is activated, but only to that group in particular, without the other group of players being affected and that's what I do not know how to do it.
  5. Hi, I need a help guys, can someone make me a simple script, where the enemy on the map chases the player wherever he moves? I tried some but I did not do anything, I have not been doing anything wrong, could you help me with this please?
  6. Hi all: I have been doing missions where always in the initServer.sqf I do conditionals for missions in the following way: initServer.sqf private _run = true; private _files = datosInfo; // files private _doc_adquirido = true; //notifications documents adquires objetivoSecundario = 0; publicVariable "objetivoSecundario"; //Markers _mrk1 = createMarker ["mrk1", icon1]; //Creation Marker _mrk2 = createMarker ["mrk2", icon2]; //Creation Marker _mrk3 = createMarker ["mrk3", icon3]; //Creation Marker _mrk4 = createMarker ["mrk4", icon4]; //Creation Marker while {_run} do { //Mision One if (!alive _files && _doc_adquirido ) then { objetivoSecundario = objetivoSecundario + 8; publicVariable "objetivoSecundario"; ["objSecond", ["Members Add 8 PTS!"]] remoteExecCall ["BIS_fnc_showNotification"]; //Markers _mrk1 setMarkerShape "ICON"; _mrk1 setMarkerType "mil_unknown"; "mrk1" setMarkerColor "ColorWEST"; //"mrk1" setMarkerText "Conseguir Archivos."; _mrk2 setMarkerShape "ICON"; _mrk2 setMarkerType "mil_unknown"; "mrk2" setMarkerColor "ColorWEST"; //"mrk2" setMarkerText "Conseguir Archivos."; _mrk3 setMarkerShape "ICON"; _mrk3 setMarkerType "mil_unknown"; "mrk3" setMarkerColor "ColorWEST"; //"mrk3" setMarkerText "Conseguir Archivos."; _mrk4 setMarkerShape "ICON"; _mrk4 setMarkerType "mil_unknown"; "mrk4" setMarkerColor "ColorWEST"; //"mrk4" setMarkerText "Conseguir Archivos."; _doc_adquirido = false; }; //END MISSION CONDITIONAL. }; //END WHILE But now I realize that in a bad way I'm doing it wrong, because the server will stay working only that conditional, leaving aside any process that is part of this, since additional scripts for the server do not work for me when I use the while and until the process finishes, but is there another way to execute a conditional when it is fulfilled in initServer.sqf without using while? to make the server continue to work on other scripts and not make a practically infinite loop?
  7. Thanks for the help man, and thanks for the indication of the EH ddMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if (isNull _instigator) then {_instigator = UAVControl vehicle _killer select 0}; // UAV/UGV player operated road kill if (isNull _instigator) then {_instigator = _killer}; // player driven vehicle road kill //_westSide = [objNull, true] call BIS_fnc_objectSide; if (side group _killed == WEST) then {[1,11] call FAM_fnc_puntaje}; }];
  8. Appropriate method to create mission conditionals, if an action is fulfilled the objective is fulfilled and I wanted to know if I'm doing it properly, Sorry my bad english
  9. Would this be fine in this way? private _files = datosInfo; // files objetivoSecundario = 0; publicVariable "objetivoSecundario"; //Markers _mrk1 = createMarker ["mrk1", icon1]; //Creation Marker _mrk2 = createMarker ["mrk2", icon2]; //Creation Marker _mrk3 = createMarker ["mrk3", icon3]; //Creation Marker _mrk4 = createMarker ["mrk4", icon4]; //Creation Marker //Mision One _files addEventHandler ["Deleted", { objetivoSecundario = objetivoSecundario + 8; publicVariable "objetivoSecundario"; ["objSecond", ["Members Add 8 PTS!"]] remoteExecCall ["BIS_fnc_showNotification"]; //Markers _mrk1 setMarkerShape "ICON"; _mrk1 setMarkerType "mil_unknown"; "mrk1" setMarkerColor "ColorWEST"; //"mrk1" setMarkerText "Conseguir Archivos."; _mrk2 setMarkerShape "ICON"; _mrk2 setMarkerType "mil_unknown"; "mrk2" setMarkerColor "ColorWEST"; //"mrk2" setMarkerText "Conseguir Archivos."; _mrk3 setMarkerShape "ICON"; _mrk3 setMarkerType "mil_unknown"; "mrk3" setMarkerColor "ColorWEST"; //"mrk3" setMarkerText "Conseguir Archivos."; _mrk4 setMarkerShape "ICON"; _mrk4 setMarkerType "mil_unknown"; "mrk4" setMarkerColor "ColorWEST"; //"mrk4" setMarkerText "Conseguir Archivos."; }]; Using events like this would be better on the server?
  10. I'm sorry to say that as I mentioned in previous posts I'm still new and I'm beginning to understand how each variable works, among other things, that's why I ask questions in that way, because if it costs me a little, I do not give up. Thanks for the book before
  11. Good guys, I would like you to help me with this script: It turns out that I made this script with the purpose that when a unit is eliminated depending on the side it is, it does an action, but I do not know what it would be doing wrong. this script if it worked as it wanted in dedicated server: FAM_DeadCivilianCount = 0; publicVariable "FAM_DeadCivilianCount"; { if (side _x == Civilian && _x iskindof "Man") then { _x addEventHandler ["killed", { ["Civil", ["Han Matado un Civil. Penzalización -2 Puntos!"]] remoteExecCall ["BIS_fnc_showNotification"]; FAM_DeadCivilianCount = FAM_DeadCivilianCount + 2; publicvariable "FAM_DeadCivilianCount"; }]; }; } foreach allunits; But when I combine it in this way for the other side: FAM_DeadCivilianCount = 0; FAM_DeadPlayerCount = 0; FAM_DeadPEnemyCount = 0; publicVariable "FAM_DeadCivilianCount"; publicVariable "FAM_DeadPlayerCount"; publicVariable "FAM_DeadPEnemyCount"; { if (side _x == Civilian && _x iskindof "Man") then { _x addEventHandler ["killed", { ["Civil", ["Han Matado un Civil. Penzalización -2 Puntos!"]] remoteExecCall ["BIS_fnc_showNotification"]; FAM_DeadCivilianCount = FAM_DeadCivilianCount + 2; publicvariable "FAM_DeadCivilianCount"; }]; } else { if (side player == WEST && player iskindof "Man") then { player addEventHandler ["killed", { ["JugadorDead", ["Miembro de equipo Muerto. Penzalización -1 Puntos!"]] remoteExecCall ["BIS_fnc_showNotification"]; FAM_DeadPlayerCount = FAM_DeadPlayerCount + 1; publicvariable "FAM_DeadPlayerCount"; }]; }; } else { if (side _x == EAST && _x iskindof "Man") then { if (FAM_DeadPEnemyCount == 20) then { publicVariable "FAM_DeadPEnemyCount"; objetivoTareaTres = objetivoTareaTres + 2; publicVariable "objetivoTareaTres"; ["tareaTres", ["20 Enemigos Muertos. Reciben 2 Puntos!"]] remoteExecCall ["BIS_fnc_showNotification"]; //hint str cash; }; _x addEventHandler ["killed", { ["JugadorDead", ["Miembro de equipo Muerto. Penzalización -1 Puntos!"]] remoteExecCall ["BIS_fnc_showNotification"]; FAM_DeadPEnemyCount = FAM_DeadPEnemyCount + 1; publicVariable "FAM_DeadPEnemyCount"; }]; }; }; } foreach allunits; It throws me an error and I would like to know how they help me in Server to work correctly. thanks and regards.
  12. 32/5000 I could do this in the init.sqf? //init.sqf if (!local isServer) exitWith {onPlayerConnected "updates.sqf"}; In updates.sqf //updates.sqf publicVariable "publicTime"; publicVariable "penaTiempo"; publicVariable "objetivoPrimario"; publicVariable "objetivoSecundario"; publicVariable "objetivoTarea"; publicVariable "bonoBandera"; publicVariable "civilesFinal"; publicVariable "vehEnemigoFinal"; publicVariable "PuntajeFinal"; //Misiones publicVariable "objetivoPrimarioOne"; publicVariable "objetivoPrimarioDos"; //Objetivo Secundario publicVariable "objetivoSecundario"; //Tareas publicVariable "objetivoTareaUno"; publicVariable "objetivoTareaDos"; publicVariable "objetivoTareaTres"; //Vehículos neutralizados publicVariable "vehAliadoFinalUno"; publicVariable "vehAliadoFinalDos"; publicVariable "vehAliadoFinalTres"; //Otros publicVariable "FAM_granDamage"; publicVariable "FAM_ambushEnemy"; publicVariable "FAM_libres"; publicVariable "FAM_DeadCivilianCount"; publicVariable "FAM_DeadPlayerCount"; publicVariable "FAM_DeadPEnemyCount"; I could be doing it right?
  13. thanks for your help! I managed to update the script so far, doing it this way too, if I'm wrong or you think I have to optimize the code just tell me. FAM_DeadCivilianCount = 0; FAM_DeadPlayerCount = 0; FAM_DeadPEnemyCount = 0; publicVariable "FAM_DeadCivilianCount"; publicVariable "FAM_DeadPlayerCount"; publicVariable "FAM_DeadPEnemyCount"; { if (side _x == Civilian && _x iskindof "Man") then { _x addEventHandler ["killed", { ["Civil", ["Han Matado un Civil. Penzalización -2 Puntos!"]] remoteExecCall ["BIS_fnc_showNotification"]; FAM_DeadCivilianCount = FAM_DeadCivilianCount + 2; publicvariable "FAM_DeadCivilianCount"; //FAM_DeadCivilianCount call FAM_fnc_deadCivilians; }]; }; if (side _x == EAST && _x iskindof "Man") then { _x addEventHandler ["killed", { FAM_DeadPEnemyCount = FAM_DeadPEnemyCount + 1; publicVariable "FAM_DeadPEnemyCount"; }]; }; if (side player == WEST && player iskindof "Man") then { player addEventHandler ["killed", { ["JugadorDead", ["Miembro de equipo Muerto. Penzalización -1 Puntos!"]] remoteExecCall ["BIS_fnc_showNotification"]; FAM_DeadPlayerCount = FAM_DeadPlayerCount + 1; publicvariable "FAM_DeadPlayerCount"; }]; }; } foreach allunits; [] spawn { if (FAM_DeadPEnemyCount == 20) then { publicVariable "FAM_DeadPEnemyCount"; objetivoTareaTres = objetivoTareaTres + 2; publicVariable "objetivoTareaTres"; ["tareaTres", ["20 Enemigos Muertos. Reciben 2 Puntos!"]] remoteExecCall ["BIS_fnc_showNotification"]; }; }; thanks and regards.
  14. Hi all, I have a problem that does not allow me to live in peace, I try to make an event that when a vehicle receives an amount of damage a variable is TRUE and I mark a specific action, but every time I enter the map to try the script something It goes wrong and I do not know what it would be. Someone help me? here the script that I have made. //initDamageVeh.sqf _granDamage = false; dispo1 addEventHandler ["Hit", { params ["_unit", "_source", "_damage", "_instigator"]; dispo1 setdamage 0.10; veh = getDammage dispo1; if (veh => 0.30) then { _granDamage = true; }; }];
  15. redburn

    EventHandler "Hit"

    Thanks, is that I still try to learn about the scope of everything, I wanted to learn about the events and that's why I was doing an EH, but you're also right if I simplify in that way, I still have a long way to go, but I do not I faint for things that I still do not understand at all, little by little I will understand it. There is a book that I have that talks about the use of variables and other things, but does not speak for example of the white list and that I would also like to learn, if you have something that I can use to learn it more thoroughly I would thank you very much and thank you for aid.
  16. redburn

    EventHandler "Hit"

    that is, a random amount, not less than 0.3 I'm sorry not to explain myself correctly.
  17. redburn

    EventHandler "Hit"

    As I had mentioned above, what I'm looking for is for you to do the following: when a vehicle receives damage a number of times, then a mission passes as failed! that's why he had calculated that if he received an amount X of damage then the following will be activated.
  18. redburn

    EventHandler "Hit"

    what happens is that I'm still a novice and I'm learning how to do event handlers, and I'm still a little ignorant of the situation
  19. redburn

    EventHandler "Hit"

    What I need is that: when a vehicle receives damage a number of times, then a mission passes as failed! that's why he had calculated that if he received an amount X of damage then the following will be activated.
  20. Hi guys, Today I come to a query to know if I could make my first Script correctly, //init.sqf bluNums = west countSide allPlayers; while {true} do { { if (!alive player) then { bluNums = bluNums - 1; if (bluNums <= 6 && _downAllies) exitWith { detenerTiempo = true; "EVERYONELOST" remoteExecCall ["BIS_fnc_endMissionServer", 0, true]; _downAllies = false; }; }; } forEach allPlayers; }; This script was written to indicate to the system that when they have killed a number of blufor soldiers the game ends as lost, since there are 16 blufor but I wanted the counter to subtract to the global variable -1 and to reach 6 finish the mission, because I put a player counter. The script is fine? or do you see any failure or improvement? thank you very much
  21. redburn

    player count Kills

    I had twice error with execVM and running BIS_fnc_endMissionServer, since I started using it with remoteExecCall I do not have that finalization problem anymore, that's why I've been using it.
  22. How can I do to buy if BIS_fnc_endMissionServer has been executed with conditionals? try doing the following: if (typeName BIS_fnc_endMissionServer == 1 ) exitWith { while {true} do { ["<t font = 'PuristaMedium'><t size = '1'><t color = '#00ffd8'>" + timedisplay + "</t>",-1,0.10,10,0,0,789] spawn BIS_fnc_dynamicText; sleep 10; }; }; but without success, can someone tell me how to compare this so that, for example, are stopped the chronometer all players ?
  23. This is my example: //cronometre.sqf private _terminarTiempo = true; checkrun = true; //////so that the script works once _publicTime = _this select 0; publicTimerON = true; ////////////////////// publicTimerOver = false; detenerTiempo = false; while {publicTimerON && _publicTime>10} do { //while it is greater than 10 seconds _publicTime = _publicTime -1; sleep 1; _timestamp = _publicTime/3600; if (detenerTiempo) exitWith { while {true} do { ["<t font = 'PuristaMedium'><t size = '1'><t color = '#00ffd8'>" + timedisplay + "</t>",-1,0.10,10,0,0,789] spawn BIS_fnc_dynamicText; sleep 10; }; }; timedisplay = [_timestamp, "HH:MM:SS"] call BIS_fnc_timeToString; ["<t font = 'PuristaMedium'><t size = '1'>" + timedisplay + "</t>",1,-0.15,1,0] spawn BIS_fnc_dynamicText; }; //Last 10 seconds in red with a beep while {publicTimerON && _publicTime<=10 && _publicTime> 1} do { //as long as it is less than or equal to 10 and greater than 1 _publicTime = _publicTime -1; sleep 1; _timestamp = _publicTime/3600; if (detenerTiempo) exitWith { while {true} do { ["<t font = 'PuristaMedium'><t size = '1'><t color = '#00ffd8'>" + timedisplay + "</t>",-1,0.10,10,0,0,789] spawn BIS_fnc_dynamicText; sleep 10; }; }; timedisplay = [_timestamp, "HH:MM:SS"] call BIS_fnc_timeToString; ["<t font = 'PuristaMedium'><t size = '1'><t color = '#FF0000'>" + timedisplay + "</t>",-1,-1,1,0] spawn BIS_fnc_dynamicText; playSound "time"; }; while {publicTimerON && _publicTime>= 0} do { //if it is less than 1 and equal or greater 0 _publicTime = _publicTime -1; sleep 1; _timestamp = _publicTime/3600; _fin = [_timestamp, "HH:MM:SS"] call BIS_fnc_timeToString; ["<t font = 'PuristaMedium'><t size = '1'><t color = '#FF0000'>" + "00:00:00" + "</t>",-1,0.10,10,1,0,789] spawn BIS_fnc_dynamicText; }; checkrun = false; if (_publicTime <= 0) exitWith { //Yes, the time reaches 0 then load mission end. publicTimerOver = true; publicVariable "publicTimerOver"; "EVERYONELOST" call BIS_fnc_endMissionServer; }; in the flag //flag.sqf detenerTiempo = false; publicVariable "detenerTiempo"; [fam, //Nombre del objeto "Terminar Partida", // Titulu de la acción "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", //El icono que se mostrara en pantalla (chequeara descripcion para este icono) "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", // Icono de progreso mostrado en pantalla (cambios de icono cuando inicia la accion) "player distance fam < 5", // La condicion para la accion a mostrar "player distance fam < 5", // La condicion para la accion en progreso {}, // El codigo ejecutado cuando la accion inicia (esto no sera usado por el momento) {}, // El codigo ejecutado en todo el tick del progreso (eso no sera usado por ahora) {detenerTiempo = true; "EVERYONEWON" remoteExecCall ["BIS_fnc_endMissionServer", 0, true]; }, //El codigo ejecutado para completar {hint "Manten Presionado finalizar la misión"}, //El codigo ejecutado cuando el jugador es interrumpido (jugador le va por la key) [], // Argumentos pasados al Script (eso no sera usado por el momento) 5, // la duracion (como sera de largo el proceso de accion para completar en segundos) 0, // prioridad (seguro sobre dejar esto en 0) true, // Elimina la accion cuando la misma ya ha sido completada (true o false) false // Muestra en estado inconciente (tener seguro dejar esto en false para que trabaje) ] remoteExec ["BIS_fnc_holdActionAdd", [0,-2] select isDedicated, true]; //Esto permite el trabajo en el server! place the variable in flag as global (publicVariable "stopTime") so that when it changes to true, immediately the stopwatch stops for all and do what I ordered in a stopwatch, I freeze the time showing in what time that action was finished, but only is paralyzed for who did it, not for all
  24. redburn

    player count Kills

    thanks for the information, I will try to make eventhandler of this to see what happens.
×