-
Content Count
1003 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by alleycat
-
Wrote a ticket tracking script. But the conditions fail sleep 5; _txt = "Ticket-Tracker: Starting to track tickets"; _txt remoteExec ["systemchat"]; _tickets_blue = [west,0] call BIS_fnc_respawnTickets; _tickets_green = [resistance,0] call BIS_fnc_respawnTickets; while {(_tickets_blue > 1) or (_tickets_green > 1)} do { _tickets_blue = [west,0] call BIS_fnc_respawnTickets; _tickets_green = [resistance,0] call BIS_fnc_respawnTickets; sleep 2; }; _txt = "One team out of tickets, ending mission"; _txt remoteExec ["systemchat"]; The script only works if the while condition only checks for one teams tickets, like this: while {_tickets_blue > 1} do Why is the or condition faulty? EDIT because it needs AND instead of OR. moderator please remove
-
BIS_fnc_respawnTickets fail
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
---------------------------------- -
Catch when mission ends because of tickets reaching 0?
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://community.bistudio.com/wiki/addMissionEventHandler _id = addMissionEventHandler ["Ended",{ diag_log text "START END";_this execVM "server\end.sqf"; }]; This only partially works. "START END" does fire, but anything in the end script does not. I am looking for a way to either stop the ticket bleed to end the mission so I can end it with my own scripts. Or a way to run all the scripts I want when it ends. -
I think this is an embarrassing question. How to display % in a string? I have tried double quotation, did not work.
-
How to display % in a string?
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That did not work. However using "%" as a variable and then referencing it with %1 in the formatted text worked. -
descriptive classname of a unit?
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yes that was exactly what I was looking for. Thanks a lot. -
I would like to retrieve the descriptive classname of a unit. I know how to do it for weapons: _weapon = (configFile >> "cfgWeapons" >> _weapon); but I am not sure how to do it for units
-
Check if variable exists before using getvariable?
alleycat posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I want to check for a variable of an object that was set by setvariable. How would I check if the variable exists at all to prevent an error? -
Using remoteexec to call a script problem
alleycat posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
How would I tell a client to execute a script from the server with remoteexec? I remember using https://community.bistudio.com/wiki/BIS_fnc_MP but that is obsolete with https://community.bistudio.com/wiki/remoteExec However the https://community.bistudio.com/wiki/remoteExecpage has no example for calling a script on the client, instead of a function. -
Check if variable exists before using getvariable?
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
EDIT I think https://community.bistudio.com/wiki/isNilis going to work. -
Using remoteexec to call a script problem
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks -
setvariable + remoteexec problem
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks that was helpful. The _playerobject is the same as the owner ID? In the script I am using it that variable is the first passed argument in initplayerserver -
I want to set a connected player to have a variable set. initplayerserver.sqf _clientID = owner _playerobject; diag_log text format ["_clientID %1", _clientID]; [_playerobject,"thevar",123,true] remoteExec ["setVariable",_clientID,true]; However the variable is <null>. Tried both on a remote dedicated and local server.
-
Quick and fun projectile path tracing!
alleycat replied to Hypnomatic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
{ [_x, [0,0,1,1], 3, 2, nil, 6] call hyp_fnc_traceFire; } forEach Allunits; When I call this from admin console and global exec it runs on every client as intended. But calling that script on a client from the server does not work, when called from onPlayerKilled.sqf Why is does it not work? -
For everything that is holy PLEASE turn down or MUTE the darter engine sounds.
alleycat posted a topic in ARMA 3 - GENERAL
Can we please get an option to mute engine sounds on the darter drones or have it low by default? It is ear-shattering and in multiplayer no one can use it because 1. They can not handle the pain of the sound for long 2. The engine is so loud it drowns out any VOIP comms. Now please do not suggest to lower the ingame volume, because I do not wan to throw out all the good audio from the game just to make the darter engine quieter. Do you developers use metrics to determine whether people actually use darters? I am sure no one uses them just beause of the ear-shattering RRRRRRRRRRRRRRR. Besides these drones would not even have microphones mounted because all it would record is the ear-shattering engine sound. So why can't it be muted? -
I want to use settaskstate in a remoteexec, but I do not know the syntax. "Succeeded" remoteExec ["setTaskState", 0, true]; I do not know where to put the task variable https://community.bistudio.com/wiki/setTaskState
-
I would like to check whether a weapon is within an array of weapons. The problem is not the array but the different weapons having different classnames depending on attachments. Is there a way to check if a weapon is an MX rifle (carbine) regardless of the attachments? I have tried iskindof but that appears to be completely useless. From the developer console: (currentweapon player) iskindof "srifle_LRR_camo_LRPS_F" = false currentweapon player == "srifle_LRR_camo_LRPS_F" Makes no sense. In the same console screen I put both lines in the watch field. The weapon being reported as the current weapon of the player returns false on a iskindof check. EDIT: I will check for ammo type used, should work for the purpose
-
Teamkill check fail (side check fails to detect teamkills)
alleycat posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am trying to detect teamkills from a MPKilled event handler. if ((side _unit) != (side _causedBy)) then { systemchat "kill"; }; if ((side _unit) == (side _causedBy)) then { //Suicide if (_unit == _causedBy) then { systemchat "suicide"; } //It's a teamkill else { systemchat "teamkill"; }; }; _unit is the unit that was killed. _causedBy is the killer. When I shoot a friendly AI, it always counts as a normal kill. My suspicion is that the moment I kill a friendly the game turns me into a renegade and the side check passes. So I was looking for a way to compare configs of units. For CSAT, all infantry soldiers have "O_Soldier_base_F" as a parent. So I was looking for a way to compare whether shooter and victim share the same parents. I have looked at: https://community.bistudio.com/wiki/inheritsFrombut that does not seem to do what I want. As a last resort I can check for similar uniforms of both units. -
settaskstate in remoteexec problem
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks, so the pattern is arranging parameters from left to right, no matter the syntax? -
If I want to make a player ZEUS by UID, what do I have to type in in the owner field? the number, or the number with "?
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok so just the number like this: 5645645645646456 and not "5645645645646456" or is it #5645645645646456 Which is the correct option -
Yes that is actually from the demo mission where the officer talks to the guys. "Wait a moment, let me check in with that patrol". Instantly recognized where it was. Has it been 15 years already?
-
Is there a way to check if a weapon is an MX rifle (carbine) regardless of the attachments?
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Tested in admin console. primaryWeapon indeed reliably returns the base weapon. However the wiki description is misleading, making it appear that it will return a a subclass with an attachment -
Is there a way to check if a weapon is an MX rifle (carbine) regardless of the attachments?
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks that function is very useful. -
Is there a way to check if a weapon is an MX rifle (carbine) regardless of the attachments?
alleycat replied to alleycat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks, I do not understand these >> commands, they are so cryptic to me. As for the weapon I went for detecting the magazine, seemed the most reliable and easiest way. I am trying to check if a player was a sniper and was using a sniper rifle in an eventhandler. for the ammo I checked it against and array of ammo types and used the boolean in the condition. I tried the same with the player class, but that did not work. if ((_causedBy isKindOf "O_sniper_F") or (_causedBy isKindOf "I_sniper_F") or (_causedBy isKindOf "B_sniper_F")) then I would like to condense this check into something more elegant like with the ammo where I wrote: EDIT: would it be possible to write a check like so: _causedBy isKindOf _variablethatchecksifinsomearray _magazines = ["7Rnd_408_Mag","5Rnd_127x108_Mag"]; _ammotype = currentMagazine _causedBy; _ammotype = _ammotype in gsa_sniper_magazines; _class if ((_causedBy isKindOf "O_sniper_F") or (_causedBy isKindOf "I_sniper_F") or (_causedBy isKindOf "B_sniper_F")) then { systemchat "pass sniper class"; if (_ammotype) then { systemchat "killed by valid sniper rifle"; hint "killed by valid sniper rifle"; };