Search the Community
Showing results for tags 'mpscripting'.
Found 2 results
-
Supply system for MP games on dedicated server
Kelenon posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've been working past few weeks on a system for my unit that would spice things up a little and allow us to search containers for supplies, claim vehicles, salvage wrecks for scrap and track supply usage across the mission. What I managed to get working is the supply tracking piece which basically uses EH to remove for example 1 unit of ammo when player reloads and old magazine is almost empty or removes 1 unit of medicaments when player uses 10 medical items (this one uses ACE). What is also working (with some small issues but still quite alright all things considered) is the scripts that create actions on objects that allow for either searching object for supplies or claiming it or scrapping it - this works well when I call script file from object init field. What I wanted to achieve though is that the action is being applied to: - all viable* objects placed in editor - all viable objects placed during operation (By viable I mean set of containers and vehicles that I defined in global array.) Unfortunately here it's getting complicated as I'm having problem understanding how locality should work here. Basically in MP when launching mission on dedicated server what is happening is that often actions are being applied twice to the same object (or even thrice!) and similar problems are encountered with curator placed objects. If some good soul could take a look at these scripts and point me in the right direction I would be much obliged - I don't expect anyone to fix it for me but I just need someone else insight on this one and help me save this atrocity of code I committed 🙂 -
How to create custom respawn inventory loadouts per unit
Solidsnacks posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
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!- 7 replies
-
- mpscripting
- missionediting
-
(and 1 more)
Tagged with: