Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by sgtelis

  1. What I want: So I'm making a mission where you start of by entering Arsenal. While you are in arsenal a timer ticks down and when it gets to 0 you get teleported away into the air. Before this happens I want the players to be forced out of arsenal so that they don't start free falling with arsenal open or (due to the fact that they should not take any damage until they have landed) can fidle with the arsenal while the mission is playing. When teleported into the air I want the player to not be killable. Once the player lands (either faceplant into the ground or by landing with a parachute) the player should then be able to take damage. What I got: All players get forced into arsenal in the begining and there is a timer ticking down. If you exit the arsenal you get a black screen telling you that the game is still preparing and that you can re-enter the arsenal with a button click. Once the timer runs out the players get teleported and enters free fall where he/she has access to a parachute. What I've tried: For forcing out of arsenal? Nothing cuz I can't find anything else than adding arsenal on google. For detecting if landed: getPos of player in Z axis, and it worked, unless you land on a roof. detect stances such as prone, crouch or standing. Did not work and got called while free falling. some weird hasLanded thing that most likely is only for helis/planes So again, what do I need help with: A way to detect if a player has landed, aka stopped freefalling and is not parachuting. A way to force the player out of the Arsenal.
  2. 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.
  3. 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.
  4. well, yeah. I got that far. The problem is making them take damage again.
  5. 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.
  6. 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.
  7. I call it through a script, more than that I don't know how to do.
  8. 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!
  9. sgtelis

    Detect last Group alive

    { 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]; };
  10. sgtelis

    Detect last Group alive

    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.
  11. sgtelis

    Detect last Group alive

    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.
  12. sgtelis

    Detect last Group alive

    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?
  13. sgtelis

    Detect last Group alive

    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.
  14. sgtelis

    Detect last Group alive

    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?
  15. 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! :)
  16. 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
  17. So within Zeus you can place down Intel like photos and secret documents and then edit the description of it. You can also select a image of either locations of Altis or Stratis. With code I've found out that you can change the image that get's displayed in your diary after picking it up however this only worked if done in the editor and not with Zeus. Is it possible to add in custom images to those intel objects via Zeus? https://forums.bistudio.com/topic/166686-interactive-intel-items/
  18. sgtelis

    co10 Escape

    Something I'd find fun playing with my friends would be if you could play as both BLUFOR and OPFOR trying to escape a map ruled by INDEP and the blu and red team could find eachother and fight them too while both are trying to find that radio outpost so they can extract and win the game. So the first full team to extract wins!
  19. So I got Virtual Garage to work in my mission, I can walk up to AI:s, scroll to get a option to enter Virtual Garage and spawn in any vehicle I want at a given location. What I want to do now is so that I at these AI:s only can access certain vehicles, for example I have a Car Dealer, Heli Dealer and a Armor Dealer in wich I only want to display the right type of vehicles. How can I do this? Also if the regular way is to add in every single vehicle to a list then is there a quicker way to do it since I have a lot of mods x)
  20. Not sure what you mean with "Search in the pbos." Search in the mission files? Other than that, I've used this: https://community.bistudio.com/wiki/BIS_fnc_garage And they mention how it should work however can't figure out how to actually use the code. (bis_fnc_garage_data)
  21. Noted, how could I fix this?
  22. How would I do that?
  23. How come it works for me then?
  24. So I'm trying to make survival mission for me and my friends and I want empty vehicles to spawn randomly along the roads, mainly civ vehicles but also a few military ones. I've tried to search around but I suck at searching for arma editing stuff, I don't know why xD I ofcourse want it to be as nice on the fps as possible, aka only spawn vehicles close to the player, maybe 2.5km away? I know that you can use "createVehicle" and how to make it choose a vehicle randomly from an array but I don't know how to make them spawn along the road in a good fashion. Thanks
  25. Nice! Should have responded earlier xD Any news on fixing the spawn height?