Jump to content

Solidsnacks

Member
  • Content Count

    39
  • Joined

  • Last visited

  • Medals

Everything posted by Solidsnacks

  1. As the name implies, I'm asking advice on how to create custom respawn inventories per unit using BIS_fnc_addRespawnInventory. So here's the situation: I have a group placed in the editor, the group is named and each unit belongs to the group and has "US_ARMY_FT = group this" in their inits so they all belong to the same group. Each member is individually named "US_ARMY_FTL, AR etc. So they all have a specific variable name with a similar naming convention. Here's where it gets confusing. I'm able to use BIS_fnc_addRespawnInventory to give the group respawn inventories without a hiccup. The following is what I use for the loadouts. Everything's fine when I use this method, but I wanted to fine tune it so there would be more emphasis on role selection in the lobby and also to force players to use equipment appropriate to their class. So then I came up with this, which is more or less the same as above but references the unit's variable name. Whenever I try this second method it gives me an error saying that "us_army_ftl" is an undefined variable, which is ironic considering that it says nothing about the group I reference for respawn tickets. Additionally, I have other scripts and functions that reference the unit names I've applied and I've received no error messages about them and nothing has been logged in the RPT other than the undefined variable error to indicate anything has gone wrong. It's worth noting that despite the game throwing that specific script error on mission start and it not behaving the way I want it to it still gives me the custom classes that I defined in the Description.ext based on the entries above. So my questions are: How do you make a respawn menu with loadouts custom to the unit/object. Can you do that? Why does the script think my variable is undefined? Thanks in advance!
  2. Solidsnacks

    Respawn Menu Loadouts

    How exactly are you spawning/ respawning them? If you have an example I might be able to help.
  3. Solidsnacks

    Respawn Menu Loadouts

    Alright. Let's cut the shit and keep this simple. 1. Open the editor and choose a map of your choice. 2. Place a marker. Right-click the marker and select "Attributes" . In the following menu type "respawn_West" (without the quotation marks) in the "Variable Name" field. 3. Place a "BLUFOR" unit. It will be playable by default, but you can also go into its attributes and ensure that it is playable under the "Object: Control" tab. (You can select any unit type you like, but it's simpler to select from the "Men" category. 4. Paste the following into your Description.ext. 5. Paste the following into a file named initPlayerLocal.sqf 6. Test the mission by hosting a local server (LAN). This will give you a Multiplayer Respawn menu with four "Roles", and a variety of "Loadouts". You can go into the "Description.ext" and tinker around with the various "Loadouts" and add or remove them via the "initPlayerLocal.sqf" file. Like some have mentioned; You will need to do your homework if you want to get the results you're looking for. I recommend reading everything you can on the following links and try to understand how they are connected to each other. Arma 3 Respawn Description.ext
  4. I have a switch statement that fails to return any of the cases and instead returns default. I've used different classnames for default and they work successfully but the cases fail to return when called. The script is copied (the entire file TBH) from BI's 'Escape from Malden' initServer.sqf with the only changes being the changes to the classnames the cases reference. My initServer.sqf edit: The original unedited version:
  5. Solidsnacks

    Switch statement returns default

    Nice catch @Larrow! Another thing I’ve noticed is the trigger attributes can be modified and saved in the mission.sqm. Then you can load/ save, and preview the mission without the attributes changing, but the moment you start changing any of the trigger properties in the editor it will add the call {attribute}. Seeing how I’m only using a small number of these—-and don’t mind manually changing them in the editor—-I consider my problem solved. For the sake of anyone else that might struggle with something similar; can you suggest somewhere to start looking to learn how to restrict that behavior?
  6. Solidsnacks

    Switch statement returns default

    Hey all. I took a couple of weeks away to rethink what was going on and decided to look in the mission.sqm to see if there was anything different about the triggers and their statements. I found this I decided to compare it to the original mission.sqm and found this. The interesting part is the changes in the "condition" and "onActivation" fields. I went into the mission.sqm and manually changed them to match the original and got the desired behavior from my switch statement. Once again, the trigger is directly copied from the original mission so I get the feeling this isn't how it's supposed to work. When I load the mission it changes the trigger "cond." and "onAct.". Does anyone know why this is happening and/or how to prevent it?
  7. Solidsnacks

    Switch statement returns default

    Thanks everyone for chiming in. Much respect to all of you. @killzone_kid I get what you mean by “select 1” returns the “on activation” statement. The part that’s messing me up is that I have the triggers configured identically to the ones in the original escape scenario so I’m really at a loss for why it wouldn’t give me the same output as the original. The original triggers simply have MRAP, APC etc (no quotes “ “ or anything) in the “on act.” block. So I’m not sure if you meant something else in your last sentence. @dedmen I had a friend tell me the same thing so I’ll have to see if something pops up in the logs ‘cause it’s not throwing any errors or anything that I can see in the rpt—if that’s even a thing. Thanks again, all! I’ll update when I get home and can check it out.
  8. Solidsnacks

    Switch statement returns default

    Right. I should have mentioned that I use the cases in the trigger statements from empty detector triggers in the editor. I’ve reviewed everything and it’s all 1:1. Would anyone like to reproduce this on their end?
  9. Hi Temppa! I posted on your workshop page but figured I might as well mention it here as well. The ambient sounds are bugged whenever you move away from vegetation. They become mute and the game becomes weirdly silent except for your character movements. I love your maps especially hellannmaa so this is an especial bummer for me. Thanks for what you do!
  10. Solidsnacks

    cfgRespawnloadout backpacks Issue

    You have all the medical items in the wrong “field”. They need to go in the “items” section. The “linked items” is for headgear, goggles, attachments etc that have slots in the inventory parsed for them
  11. If you look at the mission in the editor you’ll see there are empty detector triggers located around the map that have Gen_Infantry/ Nato_Infantry in their “text” fields. These need to be placed within your mission for the corresponding code to execute. Also, it would help if you could share the original initserver.sqf that you copied and the one you created for your mission
  12. This is the relevant stuff. The unit is placed in the editor with "US_ARMY_FTL = group this" in its init. Technically, it's alive at mission start. I've considered a switch (true) do alternative to sort it out, but it would seem the base FUNCTIONality has my bases covered, unfortunately it does not I've tried calling it from different events: init.sqf, unit server etc. all with the same result: that the variable US_ARMY_FTL is undefined
  13. So let's take a look. The target in this case is a unit placed in the editor given the name: US_ARMY_FTL. For some wild reason unbeknownst to me, the script seems to think that US_ARMY_FTL is an undefined variable. Can anyone comment on why my logic is wrong? To be clear: the script works if I use missionNamespace, Side, and Group. it DOES NOT work when I try to reference a specific unit.
  14. Thanks for the reply. I mustn't have been clear when I said that the script works fine in the first example. I've gone over the above page you've linked many times and I can't figure out why it can't produce a specific loadout for a specific unit/object as per the function's parameters and posted my example to see if anyone else could spot what I've done wrong or explain why it wouldn't work. Thanks!
  15. I'm trying to change the loadout of a unit spawned with https://community.bistudio.com/wiki/BIS_fnc_spawnGroup Right now, I'm able to spawn in a group of units and modify all of their gear, but I wanted to take it a step further and modify each group member's gear specifically. I've been looking for a means to check the class of a unit and execute custom code for said unit class, but I haven't turned up anything useful outside of defining individual units and their gear then putting them into a group. I spawn the group like this: contact1 = [getMarkerPos "con1", Independent, ["I_soldier_F", "I_soldier_F","I_Soldier_AR_F","I_Soldier_GL_F"],[],["Sergeant","Corporal","Private","Private"],[],[],[2,.5],330] call BIS_fnc_spawnGroup; }; And I modify the group like this: { if (contact1 == group _x) then { removeHeadgear _x; removeAllPrimaryWeaponItems _x; _x addHeadgear "H_Shemag_olive_hs"; _x unassignItem "NVGoggles_INDEP"; _x removeItem "NVGoggles_INDEP"; _x unassignItem "ItemMap"; _x removeItem "ItemMap"; }; } foreach units contact1; After the above I hit a wall when trying to further define the gear of individual units in the group. I've tried variations like: { if (_x == typeof I_soldier_F) then { removeallWeapons _x; _x addMagazines ["30Rnd_556x45_Stanag", 3]; _x addMagazine "HandGrenade"; _X addWeapon "Arifle_MK20_F"; }; } And: { if {(contact1 == group _x)} and {(_x = typeof "I_Soldier_F")} do { removeallWeapons _x; }; }; Admittedly I'm shooting in the dark here. If anyone can point me in the right direction, I would be very grateful.
  16. I'm trying to customize the background of the mission briefing notes section and haven't found anything that addresses what I'm looking for. I can control fonts and colors fine, but there doesn't seem to be anything to change the background image or color/alpha. I've looked up the old briefing.html, but it says it's now obsolete. I'm not afraid to get into Dialog controls, though from what I've read I think I'd be barking up the wrong tree.
  17. Solidsnacks

    Custom briefing background controls

    Good job! I had actually been sifting through a3\ui_f_data\... last night, but was always a hair away from what I was looking for. Once I get some proper examples set up I'll throw them onto here. Seriously, big thanks, Larrow!
  18. Solidsnacks

    Custom briefing background controls

    I had a sneaking suspicion that was the case by the time I started this thread. Thanks for chiming in.
  19. Solidsnacks

    Custom briefing background controls

    I considered that, only problem is the lack of marker links, page links etc.
  20. Hey Psycho, thanks for the awesome script! I use it in every mission now. I was just curious how I would go about making a single unit capable of reviving healing instead of everyone being able to revive heal. // by EightSix private ["_healer","_isMedic"]; _healer = _this; _isMedic = if (getNumber (configFile >> "CfgVehicles" >> (typeOf _healer) >> "attendant") == 1) then {true} else {false}; _isMedic I was looking at the isMedic function and I can't seem to understand how I would change it to make only one class capable of healing. I'm sure you're busy, any advice would be appreciated. Cheers on the best lightweight revive/medic script. I read your earlier post about this not being a "revive" script, and I understand that, but there must be something I can change to single out a specific unit for healing other units.
  21. I would recommend looking for training manuals related to the type of organization you want to portray (if you want to portray it realistically) and see how they approach common concepts such as warfighting functions, command and control, and task organization. These resources do require a bit of reading and research to implement 'authentically' as well as accurately, but they're a great place to get the information you're looking for. It would also help to look at real-life military operations to get a sense of what 'balance' might mean to your mission design. For instance: Operation Urgent Fury was the U.S. invasion of Grenada (an island roughly twice the size of Washington D.C.) that involved thousands of service men and women across every branch of the U.S. miltary. Hope this gives you some ideas. I'll try to give you some links to good resources when I have some time to spare as I'm a little busy right now.
  22. Solidsnacks

    Change spawned AI loadout by class

    That worked perfectly! :cheers: I had been looking at switch statements but was having a hard time wrapping my head around them. Excuse me just one more question: how was _x referenced in your example? To me it looked like it would have given back an undefined variable. At any rate. Thanks again!
  23. Solidsnacks

    Loadout at briefing

    Is this working for MP yet? I can get it working in SP and the editor, but it won't show the gear when I host.
  24. Solidsnacks

    Totally at a lost....intros....

    Is the vehicle of the "empty" type?
  25. Does anyone know what the advantages of FNC_moveIn are over the standard moveIn command? I've been sifting through some unPBO'ed official missions and I thought it was curious they would call fnc_movein in a script to load a passenger instead of simply using a moveinCargo command.
×