-
Content Count
63 -
Joined
-
Last visited
-
Medals
Posts posted by migueldarius
-
-
So you want to restrict the UAV, but not the UAV?:Oo:
How about you start over by writing a proper description of:
1. What you want
2. What you already have
3. What you don't want
4. Where the problem is
Along with any other details that might be relevant. (type of mission, equipment availability, mp/sp, scripts used, ...)
:blues:
true, true hahaha, sorry, well I want that in the mission is restrict the UAV copter, I added a virtual ammo box and I don't know how to restrict chose the UAV backpack
this addAction ["Arsenal", {["Open",true] spawn BIS_fnc_arsenal;}];
-
Hi all,
I Tried make spawn some cars in a logic point and this civil cars go to the other logic point in a traced road like a traffic.
Well, I don't know why my civilians cars don't move I don't know what I do wrong :(
generate_traffic.sqf/* null = [logic1, logic2, number] execVM "generate_traffic.sqf"; */ _start = _this select 0; _end = _this select 1; _number = _this select 2; _carList = [ "C_Offroad_01_F", "C_Hatchback_01_F", "C_Hatchback_01_sport_F", "C_SUV_01_F","C_Van_01_transport_F", "C_Van_01_box_F", "C_Van_01_fuel_F" ]; _manList = [ "C_man_p_beggar_F", "C_man_1","C_man_polo_1_F", "C_man_polo_2_F", "C_man_polo_3_F", "C_man_polo_4_F", "C_man_polo_5_F", "C_man_polo_6_F", "C_man_shorts_1_F", "C_man_1_1_F", "C_man_1_2_F", "C_man_1_3_F", "C_man_p_fugitive_F", "C_man_p_shorts_1_F", "C_man_hunter_1_F", "C_man_shorts_2_F", "C_man_shorts_3_F", "C_man_shorts_4_F" ]; trafficDone = false; for "_i" from 1 to _number do{ _civil = createGroup Civilian; _randomCar = (_carList select (random (count _carList))); _spawnCar = createVehicle [_randomCar, (getpos _start), [], 2, "NONE"]; _spawnCar setDir (getDir _start); _spawnCar setfuel 0.5 + (random 0.5); _randomMan = (_manList select (random (count _manList))); _driver = _civil createUnit [_randomMan, (getpos _start), [], 2, "FORM"]; _driver moveInDriver _spawnCar; _driver setBehaviour "SAFE"; _grp = group _driver; _waypointCar = _grp addWaypoint [(getPosASL _end), 0]; _waypointCar setWaypointStatements ["true", "deleteVehicle this; trafficDone = true"]; sleep 5; };
-
Hello all,
I need restrict the UAV backpack, only this drone, the plane and the car is allowed, only the copter is restrict, how to do this? :confused:
Thanks for read. ^^
-
someone can help me with the Restriction Script? is that I want restrict a UAV Backpack, but i don't know how to do.
-
"fireMortar.sqf"
_mortar = _this select 0; _targetArray = _this select 1; _target = _targetArray select 0; _theAmmo = getArtilleryAmmo [_mortar] select 0; _idx = 0; //-- prevents firing at aircraft if(isTouchingGround _target) then { //-- The number of times you want the _mortar to check for range while {(_idx < 8)} do{ _tgtPos = position _target; _isInRange = _tgtPos inRangeOfArtillery [[_mortar], _theAmmo ]; if (_isInRange) then { _mortar commandArtilleryFire [_tgtPos, _theAmmo , 1 ]; }; sleep 5; _idx = _idx + 1; }; };
-
I I recommend that the units speak Spanish, as the mod RHS: Escalation that the units Russians speak Russian, logic :p
-
AusSnipe73 if you make the new ship for the navy army of United States the USS Freedom http://en.wikipedia.org/wiki/USS_Freedom_%28LCS-1%29
-
I recommend you do as the mod RHS, translate Spanish voices for greater realism mod
-
My last code block, as I stated, isn't working properly, the ones before I started messing with the "fire on area" effect, were working perfectly fine, so you have set something up wrong, could you supply your mission folder?Last working version being in post #35: http://forums.bistudio.com/showthread.php?150180-Enemy-AI-using-artillery&p=2832704&viewfull=1#post2832704
Nope, I don't know what happen whit Sandstorm that don't fire more one time T-T
-
continue without shoot :/
-
Nope, don't work, only fire once time, the loop while don't work and not reload the ammo with a truck, maybe it's a bug of bohemia?
-
Well, I don't know if AI will use the ammo truck, but in any case, below should make life easy in that regard://null = [this,"mrkName",12,300] execVM "sandstormFire.sqf"; //sandstormFire.sqf _sandstorm = [_this,0,objNull,[objNull]] call BIS_fnc_param; _markerPos = getMarkerPos ([_this,1,"",[""]] call BIS_fnc_param); _numRnds = [_this,2,12,[0]] call BIS_fnc_param; _timeBetween = [_this,3,300,[0]] call BIS_fnc_param; if (isNull _sandstorm) exitWith { systemChat "Sandstorm is undefined or dead >> sandstormFire.sqf"; }; while {true} do { if (isNull _sandstorm || !alive _sandstorm) exitWith {}; _sandstorm commandArtilleryFire [_markerPos,"12Rnd_230mm_rockets",_numRnds]; sleep _timeBetween; _sandstorm setVehicleAmmo 1; };
Just right now I put the setVehicleAmmo 1 exactly your code, the AI does not want to reload... AI derp... :butbut: T_T
-
Maybe a bit more than needed, but eh, fun with functionality :D://null = [this,"mrkName",12,300] execVM "sandstormFire.sqf"; //sandstormFire.sqf _sandstorm = [_this,0,objNull,[objNull]] call BIS_fnc_param; _markerPos = getMarkerPos ([_this,1,"",[""]] call BIS_fnc_param); _numRnds = [_this,2,12,[0]] call BIS_fnc_param; _timeBetween = [_this,3,300,[0]] call BIS_fnc_param; if (isNull _sandstorm) exitWith { systemChat "Sandstorm is undefined or dead >> sandstormFire.sqf"; }; while {true} do { if (isNull _sandstorm || !alive _sandstorm) exitWith {}; _sandstorm commandArtilleryFire [_markerPos,"12Rnd_230mm_rockets",_numRnds]; sleep _timeBetween; };
You can put the call line in the init field of the object, or name the object something and put it in place of "this".
So first argument in the call line is the object that will be doing the firing.
Second argument is the marker position it's firing at.
Third argument is the number of rounds to be fired in the burst (defaults to 12).
Fourth argument is the time between firings (defaults to 300 seconds >> 5 minutes).
I have a problem, the sandstorm dont want to reload their ammo, gets stuck. Why? :confused:
I placed a ammo truck, but dont want reload.
-
How to do a Ch-67 start with a Sling ropes a Hunter and this heli drop the cargo in a marker o point that I want?
Hello guys!
I want that a AI Ch-67 drop her cargo (its a hunter with sling ropes) in a marker or pos that I want and the heli leave and the hunter start him mission. :confused:
-
If I want the artillery is a Sandstorm launcher and fire in a marker like a loop while every five minutes?
-
Ahh ok.So all players are able to heal one another, presumably, and if all players are dead then logically the mission is over so you want to end it.
In that case, something like the below would work.
It evaluates in a loop to check all the players. If less than 1 players are not (read that twice) in the BTC 'unconscious' state, then the mission will terminate.
It's probably best to put some sort of delay at the beginning, as I can foresee issues when the players have entered the game but the BTC Revive code has not initialized yet, triggering the _allPlayersDead variable right at the start before the mission begins.
// "init.sqf" or "initServer.sqf" if (isServer || isDedicated) then { [] spawn { private ["_allPlayersDead"]; mission_in_progress = TRUE; win = FALSE; _allPlayersDead = FALSE; while {mission_in_progress} do { _allPlayersDead = ({(format ["%1",player getVariable "BTC_need_revive"] == "0")} count (playableUnits + switchableUnits)) < 1; if (_allPlayersDead) exitWith { sleep 1; ["LOSER", false] call BIS_fnc_endMissionServer; sleep 1; forceEnd; }; if (win) exitWith { sleep 1; ["end1", true] call BIS_fnc_endMissionServer; sleep 1; forceEnd; }; sleep 5; }; }; };
Don't work in a Dedicated Server, Just start the mission, end the mission like all is dead. Why? Can help me please?
-
How change the key? I don't like press 2xC I like press V. Please help me :)
-
Do you want the host scenario to end once all players are dead, or do you want each player to experience an 'end mission' after they die?Those are two different things.
A petty issue I see is that 'win' is an undefined variable. Define as
win = false;
prior to the
waitUntil {sleep 0.3; (win)};
---
As for the structure, its going to require a listener on the server, and each player is going to have to send information to the listener on their death event.
// init.sqf //========== SERVER if (isDedicated || isServer) then { // define some variables deathCounter = 0; deathLimit = 10; // set this number to the number of death events you require win = FALSE; // add a network variable handler "deathListener" addPublicVariableEventHandler { deathCounter = deathCounter + 1; }; // spawn a monitor loop with 2 outcomes (win or lose) [] spawn { mission_in_progress = TRUE; while {mission_in_progress} do { // When each player dies it +1s the deathCounter variable. if (deathCounter == deathLimit) exitWith { sleep 1; ["LOSER", false] call BIS_fnc_endMissionServer; sleep 1; forceEnd; }; // Not sure where how the win variable is redefined from FALSE to TRUE, thats up to your scenario flow. if (win) exitWith { sleep 1; ["end1", true] call BIS_fnc_endMissionServer; sleep 1; forceEnd; }; }; }; } else { //=============== CLIENT // On the player, we add a killed event, and in the event of killed, we tell the server to +1 the deathCounter as per above. player addEventHandler ["Killed",{publicVariableServer "deathListener";}]; };
Also might be relevant to note that =BTC= Revive allows the player to die before sending them into a Revive'able state.
For all players dead, If all player is dead, anyone cant revive to anyone so, end mission.
The variable "Win" is defined in the editor yet with a trigger.
-
In the original post of BTC Revive, anyone answer me :(
---------- Post added at 15:54 ---------- Previous post was at 15:49 ----------
In the original post of BTC Revive, anyone answer me :(
-
Other cuestion, if in other mission without respawn or revive, only default in the description.ext "respawn = 0;" If i want Check if players is alive, this script maybe work?
hint "Alive Check Start"; sleep 2; if ({( isPlayer _x ) && !( alive _x )} count playableUnits == 0 ) then{ hint "All dead or not exist"; }; sleep 2; hint "Alive Check End"; sleep 2; AllPlayersDead = true;
-
Exactly. This is why you should make a post in BTC. The author can give you some insight. Obviously simple alive checks aren't going to work when units are going into and out of conscious / alive states with BTC...http://forums.bistudio.com/showthread.php?148085-BTC-Revive/page133
Post in, but "playableUnits" dont work too :(
-
Hi Guys, I have a problem with my "Alive Check script", I'm noob in the world of scripting but I try to learn.
My problem is that the mission not end when all players dies that mean the mission end lose, so, this script I want work with the revive script BTC, check that all players is dead and end the mission.
Please any else to work this script, whats is my fail?
Thank you for read, I hope help. :)
In Editor
Each players or units playable is named P1, P2, P3, P4... etc is for the script work
"AliveCheck.sqf"
hint "Alive Check Start"; sleep 2; if ( { !(isNull _x) && { !(alive _x) } } count [P1, P2, P3, P4] == 0 ) then { hint "Todos estan muertos o no existen"; }; sleep 2; hint "Alive Check End"; sleep 2; AllPlayersDead = true;
"init.sqf"
// ***************************** Alive Check Script ************************** AllPlayersDead = false; [] execVM "AliveCheck.sqf"; // ******************************* Revive Script ***************************** enableSaving [false,false]; call compile preprocessFile "=BTC=_revive\=BTC=_revive_init.sqf"; //call compile preprocessFile "=BTC=_revive\lite\=BTC=_revive_init.sqf"; // ******************************** Ends mission ***************************** [] spawn { waitUntil {win}; sleep 1; ["end1", true] call BIS_fnc_endMissionServer; sleep 1; forceEnd; }; [] spawn { waitUntil {AllPlayersDead}; sleep 1; ["LOSER", false] call BIS_fnc_endMissionServer; sleep 1; forceEnd; }; // ******************************* End Init *****************************
Link for the mission:
-
The problem is not the BTC revive, this work fine, is the script "alive check" that don't check if all players in the same time is dead, I think that i written correctly but dont work...
-
Hi Guys, I have a problem with my "Alive Check script", I'm noob in the world of scripting but I try to learn.
My problem is that the mission not end when all players dies that mean the mission end lose, so, this script I want work with the revive script BTC, check that all players is dead and end the mission.
Please any else to work this script, whats is my fail?
Thank you for read, I hope help. :)
In Editor
Each players or units playable is named P1, P2, P3, P4... etc is for the script work
"AliveCheck.sqf"
hint "Alive Check Start"; sleep 2; if ( { !(isNull _x) && { !(alive _x) } } count [P1, P2, P3, P4] == 0 ) then { hint "Todos estan muertos o no existen"; }; sleep 2; hint "Alive Check End"; sleep 2; AllPlayersDead = true;
"init.sqf"
// ***************************** Alive Check Script ************************** AllPlayersDead = false; [] execVM "AliveCheck.sqf"; // ******************************* Revive Script ***************************** enableSaving [false,false]; call compile preprocessFile "=BTC=_revive\=BTC=_revive_init.sqf"; //call compile preprocessFile "=BTC=_revive\lite\=BTC=_revive_init.sqf"; // ******************************** Ends mission ***************************** [] spawn { waitUntil {win}; sleep 1; ["end1", true] call BIS_fnc_endMissionServer; sleep 1; forceEnd; }; [] spawn { waitUntil {AllPlayersDead}; sleep 1; ["LOSER", false] call BIS_fnc_endMissionServer; sleep 1; forceEnd; }; // ******************************* End Init *****************************
Link for the mission:
Spawn traffic in a road that I statement with logic points
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted · Edited by MiguelDarius
add script fix
Yes is fixed, now the spawn car move to the waypoint, but right now don't delete the veichle, I don't know why if I write "deleteVehicle this" in the waypoint...