sgtelis
Member-
Content Count
40 -
Joined
-
Last visited
-
Medals
Community Reputation
11 GoodAbout sgtelis
-
Rank
Private First Class
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
player allowDamage true call on all machines help
sgtelis replied to sgtelis's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Got it working, problem was (I think) that I changed it to false and then to true in different scripts. Not sure though, but it works now.- 9 replies
-
- allowDamage
- editor
-
(and 3 more)
Tagged with:
-
player allowDamage true call on all machines help
sgtelis replied to sgtelis's topic in ARMA 3 - MISSION EDITING & SCRIPTING
well, yeah. I got that far. The problem is making them take damage again.- 9 replies
-
- allowDamage
- editor
-
(and 3 more)
Tagged with:
-
player allowDamage true call on all machines help
sgtelis replied to sgtelis's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok, to clarify even more. This is taken directly from that link too: Multiplayer: This command only works locally and must be run on all machines to have global affect. How do I run it on all machines? Works locally since I can kill my self but for everyone else I still dont take damage.- 9 replies
-
- allowDamage
- editor
-
(and 3 more)
Tagged with:
-
player allowDamage true call on all machines help
sgtelis replied to sgtelis's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well, it's presented right in the link you sent. player allowDamage true; called in a script I call from the init.sqf This makes that player only able to kill him self and not other players.- 9 replies
-
- allowDamage
- editor
-
(and 3 more)
Tagged with:
-
player allowDamage true call on all machines help
sgtelis replied to sgtelis's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I call it through a script, more than that I don't know how to do.- 9 replies
-
- allowDamage
- editor
-
(and 3 more)
Tagged with:
-
sgtelis started following Detect last Group alive and player allowDamage true call on all machines help
-
player allowDamage true call on all machines help
sgtelis posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So from what I've been able to figure out the code "player allowDamage true;" only gets done on the client that it's called on. In my mission I'm making this turns out really strange. In the begining everyone are unkillable (using allowDamage false) and then when the mission actually starts I want them to take damage. However, due to it not being called properly the players can kill themselves with grenades but not kill eachother.- 9 replies
-
- allowDamage
- editor
-
(and 3 more)
Tagged with:
-
{ if (_x == leader group _x) then {_groups pushback group _x}; } foreach allplayers; That is what I needed! ^^ Was trying to figure out how to make just that. Still going to need to test this with my friends when they come online but I believe that should do the trick! Thanks for the help guys! I'll be back if I have any issues after propper testing. End result: _myGroups = []; _getLastAliveGroup = [_myGroups, west] spawn { params ["_myGroups", "_side"]; { if(_x == leader group _x) then { _myGroups pushback group _x; } }forEach allPlayers; systemchat "Started groupcheck!"; waituntil {systemchat format ["Current alive groups: %1",_myGroups select {{alive _x} count units _x > 0 AND side _x isEqualTo _side}];sleep 3;{({alive _x} count units _x > 0) AND side _x isEqualTo _side} count _myGroups isequalto 1}; _lastAliveGroup = _myGroups select {{alive _x} count units _x > 0 AND side _x isEqualTo _side} select 0; systemchat format ["Last alive group: %1",_lastAliveGroup]; };
-
Using the first piece of code provided showed me that every side has a HQ, and prob. a bunch of logics. Think it has to do with MCC and maybe ACE 3. This seems to be steps in the right direction though. I did this: _myGroups = [group p1, group p2, group p3, group p4, group p5, group p6, group p7, group p8, group p9, group p10]; _getLastAliveGroup = [_myGroups, west] spawn { params ["_myGroups", "_side"]; systemchat "Started groupcheck!"; waituntil {systemchat format ["Current alive groups: %1",_myGroups select {{alive _x} count units _x > 0 AND side _x isEqualTo _side}];sleep 3;{({alive _x} count units _x > 0) AND side _x isEqualTo _side} count _myGroups isequalto 1}; _lastAliveGroup = _myGroups select {{alive _x} count units _x > 0 AND side _x isEqualTo _side} select 0; systemchat format ["Last alive group: %1",_lastAliveGroup]; }; And tried it with AI, if two players happen to be in the same group the group gets counted as two (or as many that are in the group). So for example, two players are in "Alpha 1-1" then that will say "Groups alive: B Alpha 1-1, B Alpha 1-1" and not end. Im using Dynamic Groups btw so not predefined.
-
A thought is that maybe I have a mod installed that screws around with the groups? So maybe if I checked if all living players are in the same group or not and if they are I continue with the script.
-
Ok, now it never want's to be true. Did this in a completly new mission: init.sqf: execVM "test.sqf"; test.sqf: hint "Before"; waituntil {{({alive _x} count units _x > 0)} count allgroups isequalto 1}; hint "After"; Placed one unit, Only hints "Before". Placed two units and killed the other one, Only hints "Before". Placed one extra unit in every group and killed the other group, Only hints "Before". EDIT: Changed the test.sqf to this for some more testing: hint "Before"; while {{({alive _x} count units _x > 0)} count allgroups > 4} do { hint "During"; sleep 1; }; hint "After"; and then it hints "After" but only if I have "allGroups > 4", if I have it anything below (aka > 3, > 2, etc) it does not exit the while loop even though I only have one unit (the player) in the whole mission. EDIT 2: By doing this: hint format ["%1", count allGroups]; it hints "20", which means there are 20 groups in the mission? Even though there is just a single unit in the mission?
-
Ok, so I did some testing. Create a empty mission and spawn in one unit. Place code in init.sqf Works. Placed more groups. Killed zed units in zed groups. Does not work. There is our problem.
-
Hmm, needs some more testing but can't seem to get it to work. Im using Dynamic Groups as my way of allowing the players to create groups and so far I've only been able to try it out my self and when I am solo in a group (aka the only one in a group and alive) it's not turning true. Am I missunderstanding this and that it require more than 1 group or more than 1 player in the groups?
-
Detect when not Free falling/Parachuting and Force close Arsenal
sgtelis replied to sgtelis's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ey, thanks! That really got me in the right direction! Due to how my script looked I obviously had to redo the way you did it quiet a bit but closeDisplay was what I was looking for! if(_prepTime == 15)then{ if !(isnull ( uinamespace getvariable "RSCDisplayArsenal" )) then { _display = ( uinamespace getvariable "RSCDisplayArsenal" ); _display closeDisplay 2; }; removeAllActions player; }; that's how I ended up forcing the player out of the arsenal. I know the script looks a bit like shit :P Thank you both for your help! :) -
So I am making a small scale BR styled missions for me and my friends to play and I've got it working so far with out groups, aka last man standing using: if(({alive _x} count ([] call BIS_fnc_listplayers)) < 2) then { and it works for that! Now, I've added in functionality for group play into the mission and I now want to change this code to instead detect the last group that has alive players in it so that the last standing group does not have to kill their teammates for the game to be over. I then assume that this would work in the regular solo play to since every unit should be in a group by them selves. I've tried searching for it but only find things about Player Unknowns Battle Royale (Big supprise) and how to move groups in vehicles and stuff. Thanks in advance!
-
Detect when not Free falling/Parachuting and Force close Arsenal
sgtelis replied to sgtelis's topic in ARMA 3 - MISSION EDITING & SCRIPTING
isTouchingGround (vehicle player); Worked like a charm! ["AmmoboxExit"] spawn BIS_fnc_arsenal; Did not work. It also says here: https://community.bistudio.com/wiki/BIS_fnc_arsenal that it doesn't work. Also, I don't use a ammobox or a object at all for entering the arsenal, I just force it upon the player. --- Love your 3den enhanced mod btw! :D