-
Content Count
1977 -
Joined
-
Last visited
-
Medals
-
Medals
Posts posted by Undeceived
-
-
I have another question here that has me racking my brains... @Larrow's code copies the subcontainers (uniforms, vests, backpacks) and their content to the end container (crate). The stuff stays in the subcontainers.
How would the code have to look like when you want to empty ("pour out", so to speak) the subcontainers into the crate, so that the contents of the uniforms, vests and backpacks are directly in the crate, not in the subcontainers anymore?
I hope my question is understandable. 😅
-
Thanks, @Clayman, and sorry for the late reply, I was busy with other things in the project. Now I got back to this.
I couldn't make it work with your code, but I managed to use Larrow's code here as basis to make it work somehow.Collect items, magazines and weapons (in weaponsItems format) from a trigger area, INCLUDING everything that is inside a container (e.g. vest or uniform) and copy everything to a container:
Spoiler_trigger = TRIGGER1; _targetContainer = CRATE1; //1: //Create array of all WeaponHolders in _trigger area (which means that you can place stuff in different places in the trigger area): _weaponHoldersInTriggerArea = (nearestObjects [_trigger, ["WeaponHolder", "WeaponHolderSimulated"], selectMax ((triggerArea _trigger) select [0, 2])]) select {_x inArea _trigger}; //2: //Let the magic begin: //Larrow's GET and SET code, slightly adapted: { _nul = [_x] call { //GET: _container = _this; TAG_fnc_getContents = { params[ "_container" ]; private _cargo = [ weaponsItemsCargo _container call BIS_fnc_consolidateArray, ( itemCargo _container select{ !( toLowerANSI( _x call BIS_fnc_itemType select 1 ) in [ "backpack", "uniform", "vest" ] ) } ) call BIS_fnc_consolidateArray, magazinesAmmoCargo _container call BIS_fnc_consolidateArray ]; private _containerCargo = everyContainer _container; { _x params[ "_type", "_object" ]; _containerCargo set[ _forEachIndex, [ _type, _object call TAG_fnc_getContents] ]; }forEach _containerCargo; [ _cargo, _containerCargo ] }; _contentWeaponHolder = _container call TAG_fnc_getContents; //SET: TAG_fnc_setContents = { params[ "_container", "_contents" ]; _contents params[ "_cargo", "_containers" ]; { _x params[ "_cont", "_contents" ]; _every = everyContainer _container; if ( _cont call BIS_fnc_itemType select 1 == "backpack" ) then { _container addBackpackCargoGlobal[ _cont, 1 ]; }else{ _container addItemCargoGlobal[ _cont, 1 ]; }; _addedContainer = ( everyContainer _container - _every ) select 0 select 1; clearItemCargoGlobal _addedContainer; clearWeaponCargoGlobal _addedContainer; clearBackpackCargoGlobal _addedContainer; clearMagazineCargoGlobal _addedContainer; [ _addedContainer, _contents ] call TAG_fnc_setContents; }forEach _containers; _fnc_addContents = { params[ "_index", "_details", "_count" ]; switch ( _index ) do { case ( 0 ) : { _container addWeaponWithAttachmentsCargoGlobal[ _details, _count ]; }; case ( 1 ) : { _container addItemCargoGlobal[ _details, _count ]; }; case ( 2 ) : { _details params[ "_mag", "_ammo" ]; _container addMagazineAmmoCargo[ _mag, _count, _ammo ]; }; }; }; { private _index = _forEachIndex; { _x params[ "_item", "_count" ]; [ _index, _item, _count ] call _fnc_addContents; }forEach _x; }forEach _cargo; }; [ _targetContainer, _contentWeaponHolder ] call TAG_fnc_setContents; } } forEach _weaponHoldersInTriggerArea;
Small note: Uniforms, vests and backpacks will stay filled in the container with their content, like they were laying on the ground.
If you want to "empty" the subcontainers in the target container (so that their content is outside of them in the target container), check Larrow's answer here. Super simple.
- 1
-
You will probably see different "scenes" everytime you launch Arma, do you? It could be that in one scene there is music implemented and in another one there is none. Depends what the scene authors have set.
Or are you talking about music coming and going while you're seeing one menu screen only (in one single Arma session)?
-
Someone please correct me but I think that it isn't possible to turn music on / off in the main menu, because what appears there is a cutscene mission which the author (either BI or a mod author) has chosen and implemented music for.
Of course it's possible to tune music down in the audio settings, but I don't think, this is what you're after.
-
Hello guys, I'm proud and happy that my campaign was reviewed by the folks at legendary OFPEC.com. 😊
You can find it here (it's spoiler-free).
- 3
-
On 8/23/2020 at 9:39 PM, Larrow said:Suppose it depends on if you want to store weapons and their current attachments, mags and ammo count and magazines with ammo count.
//_container = myBox; //Some container name given in editor _container = cursorObject; TAG_fnc_getContents = { params[ "_container" ]; private _cargo = [ weaponsItemsCargo _container call BIS_fnc_consolidateArray, ( itemCargo _container select{ !( toLowerANSI( _x call BIS_fnc_itemType select 1 ) in [ "backpack", "uniform", "vest" ] ) } ) call BIS_fnc_consolidateArray, magazinesAmmoCargo _container call BIS_fnc_consolidateArray ]; private _containerCargo = everyContainer _container; { _x params[ "_type", "_object" ]; _containerCargo set[ _forEachIndex, [ _type, _object call TAG_fnc_getContents ] ]; }forEach _containerCargo; [ _cargo, _containerCargo ] }; //Get the contents _containerContents = _container call TAG_fnc_getContents; //Clear out cargo clearItemCargoGlobal _container; clearWeaponCargoGlobal _container; clearBackpackCargoGlobal _container; clearMagazineCargoGlobal _container; TAG_fnc_setContents = { params[ "_container", "_contents" ]; _contents params[ "_cargo", "_containers" ]; { _x params[ "_cont", "_contents" ]; _every = everyContainer _container; if ( _cont call BIS_fnc_itemType select 1 == "backpack" ) then { _container addBackpackCargoGlobal[ _cont, 1 ]; }else{ _container addItemCargoGlobal[ _cont, 1 ]; }; _addedContainer = ( everyContainer _container - _every ) select 0 select 1; clearItemCargoGlobal _addedContainer; clearWeaponCargoGlobal _addedContainer; clearBackpackCargoGlobal _addedContainer; clearMagazineCargoGlobal _addedContainer; [ _addedContainer, _contents ] call TAG_fnc_setContents; }forEach _containers; _fnc_addContents = { params[ "_index", "_details", "_count" ]; switch ( _index ) do { //weapons case ( 0 ) : { _container addWeaponWithAttachmentsCargoGlobal[ _details, _count ]; }; //items case ( 1 ) : { _container addItemCargoGlobal[ _details, _count ]; }; //magazines case ( 2 ) : { _details params[ "_mag", "_ammo" ]; _container addMagazineAmmoCargo[ _mag, _count, _ammo ]; }; }; }; { private _index = _forEachIndex; { _x params[ "_item", "_count" ]; [ _index, _item, _count ] call _fnc_addContents; }forEach _x; }forEach _cargo; }; //Add cargo back in [ _container, _containerContents ] call TAG_fnc_setContents;
Needs thoroughly testing.
Just thank you, @Larrow You're a mastermind. 😄
Lil' beer incoming.
- 1
-
-
Hi @Schatten @bad benson (or others who can help), how are you guys doing? After 5 years, I have another question on this topic:
Is there a way to include items, magazines and weapons (in weaponsItems format) that are inside a container (e.g. vest or uniform) which is lying in the "collector" trigger area?
EDIT:
Brief summary of what I'm looking for:
This code creates an array of all items, magazines and weapons that are on the ground in a trigger area (if I'm not mistaken, more precise, they're in a WeaponHolder in that trigger area). Later in the code, I also put all the stuff in a crate.
Spoiler_trigger = triggerName; _stuff = [[],[],[],[]]; _objs = (nearestObjects [_trigger, ["WeaponHolder", "WeaponHolderSimulated"], selectMax ((triggerArea _trigger) select [0, 2])]) select {_x inArea _trigger}; _objs inAreaArray _trigger apply { (_stuff select 0) append (weaponsItemsCargo _x); (_stuff select 1) append (magazineCargo _x); (_stuff select 2) append (itemCargo _x); (_stuff select 3) append (backpackCargo _x); }; //Now put stuff in crate: stuffInTriggerArea = _stuff; {crate addWeaponWithAttachmentsCargoGlobal [_x,1]; } forEach (stuffInTriggerArea select 0); {crate addMagazineCargoGlobal [_x,1]; } forEach (stuffInTriggerArea select 1); {crate addItemCargoGlobal [_x,1]; } forEach (stuffInTriggerArea select 2); {crate addBackpackCargoGlobal [_x,1]; } forEach (stuffInTriggerArea select 3);
Now I'd like to expand this code so it also gets items, mags and weapons that are in containers (e.g. vests, uniforms) which are in this trigger area.
Any help would be much appreciated, thanks!
-
Hello everyone, I got back to this project and updated it with lots of bug killings and optimizations (see first post).
In case anyone gets lost in here and tries it out - have fun!
- 6
- 1
-
-
17 hours ago, ak47-su said:Please provide a G-Drive link too. Thanks
Hi!
I don't have Google Drive. What's the problem with the Steam Workshop?
-
-
Sorry to dig out this old thread. I thought that it would solve my problem but it didn't.
You guys @Grumpy Old Man @GEORGE FLOROS GR talked about how to prevent the player from opening a backpack, when he selects the action "Search backpack".
But how can I prevent the action itself appearing in the first place? -
On 3/13/2023 at 11:42 PM, Undeceived said:Really low FPS twice throughout the mission. Can't really tell when exactly this happened, there was a lot of action and movement, but this doesn't seem to be related to my PC. The FPS dropped down to 12 or so and I had to close Arma and reload several times until it somehow fixed the problem.
Just a small addition: I noted that this is indeed a problem on my end, so nevermind.
-
35 minutes ago, AZCoder said:I had the same problem on my campaigns last year. Can't remember how I fixed it but glad you did!
This helped me. https://forums.bohemia.net/forums/topic/241737-how-to-disable-the-small-tank-animation-in-main-menu/?do=findComment&comment=3473234
I hope that it's not just a local fix for me. 😄
-
Released a small update that removes the "Invaders" mini game in the main menu (small tank showing up) which "destroys" my custom menu cutscenes. 😄
- 1
- 2
-
-
Hi all, is there a way to make that small white tank symbol disappear that emerges from the bottom in the main menu together with the change of music?
Thanks a lot!
-
Hello everyone, after 5 years here comes a small update (see first post). Thanks to Maxjoiner's support, the Max Life Pack is now part of the download (it wasn't on SW anymore and vanished from Armaholic obviously).
If you are interested and played this before, maybe try to find another ending. 🤪
- 1
- 2
-
Played the SP mission and here's my feedback. It was really a great mission. Having to return to the FOB with the intel for analysis somehow motivated me as hell. The side objectives were good too. Had some great playing sessions.
Downsides which lowered the quality:
- I had problems with the UAV (which was a pity because using it was a lot of fun!). When I was in the turret, the UAV itself began moving and turning around wierdly. Auto hovering was on obviously. Altitude maybe? I was at 200 m and then tested it at 150 m but maybe this was still to high? Eventually it stopped moving like that and I could use it again but in the last fight the problem started again so I just abandoned it.
- Really low FPS twice throughout the mission. Can't really tell when exactly this happened, there was a lot of action and movement, but this doesn't seem to be related to my PC. The FPS dropped down to 12 or so and I had to close Arma and reload several times until it somehow fixed the problem.
- The UAV turret starts shooting on known enemies when you select another unit
- When I attacked a location, some enemies would just stand around, not reacting. Only when shot at.
Especially the last two points should have been a bit better in such an official release.
All in all this was money well spent though. Congratulations on the release!
- 1
- 1
-
2 hours ago, Undeceived said:Cutscenes in the mission section can't be skipped
Uh, isn't this possible by now? I remember some cutscenes in newer Bohemia DLC where you can press Space to skip... Can anyone point me in the right direction, how the command is called?
Edit:
Searched for this in the official pbo.s (e.g. Laws of War) and found something like fnc_skip, but this seems way too complicated... I probably have to give up on this. -
Thanks for replying.
The reasons are:
Cutscenes in the mission section can't be skipped.
I could use the intro section for the first cutscene and the outro section for the second one, but they (from the mission designing perspective) need different overview pictures.
-
Hello guys, looking for a solution I googled the problem today and found this thread which I myself created in 2014. 😁 It's still the same issue.
So I bump this and ask for help / ideas. Thanks a lot!
-
Nice, I didn't play SF. I wanted once but didn't get to it somehow. Definitely looking forward to the new version.
- 1
Sort Weapons/Item/Backpacks/Magazines HELP
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
It worked like magic! Thanks a lot, man!
I would never have thought that only one variable had to be changed. 😄