-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiment on disarming #1621
base: master
Are you sure you want to change the base?
Experiment on disarming #1621
Conversation
Just add the WIP tag and we know it isn't ready for merging. |
This might be what you are looking for:
|
That's exactly it! Thanks BTW, do you see any other potential problem? |
Yes. It's a BIS function after all. They use: Which leads to this miscalculation:
|
That's not a problem, I'll only use this for actual weapons. Just a quick question. Any way to put items inside a vest before putting it into the weaponholder? |
Another issue:
I don't think so. |
Too bad. That is what I feared might happen if I did that myself. Regardless of scripting commands not existing, the engine has to have a way of dealing with this. If you remove the attachments of a weapon and put it on a box it still has the previous class but it doesn't carry attachments if you pick it up again. Maybe there's some way of tapping into that. |
You could always spawn invisible, invulnurable dummy AIs and do action "DropWeapon", "DropMagazine", "DropBag" with them. This was used by ACE often in A2. |
There are the following commands for putting into clothing containers: I have no idea how attachments work with this command, but it was working for me for everything else that has that config value (can't remember which) set to 1, meaning it can be put into clothing. |
Those require the vest/uniform/backpack to be assigned to a unit. With backpacks you could maybe use the |
Exactly
Backpacks are easy, cause you can force them to fall to the ground by adding a new one and then removing it. You cannot do that with vests. |
Not sure if I understand, but you would be looking at the unit when disarming it I guses, so you could just do: |
Yes, but there's no command to drop the XXX to the ground after that |
I'm quite sure that might not be the case with way to many addons weapons. |
Ah I see, didn't understand what exactly was wanted. |
Thats sad. We could write a better function, but that doesn't guarantee that there even is a base version without attachments. |
Hmm, I have an idea. For example: It's not same for all weapons, for example MXSW has |
That would be even more unreliable with third party addons. BWA3 for example uses:
|
Okay. I broke it:
|
Great. I didn't expected less from you |
Ok, I think the only sensible thing left to try is to write a nice bug report and see if bux can get it looked at though twitter. Probably request a command to add a weapon as cargo with an array of attachments. BTW, this same problem exists for secondary weapons and pistols |
I made this one:
Seems to work better. Should there be no attachment free parent, it will return the given weapon + attachments instead... |
_unit = _this select 0; | ||
_guard = _this select 1; | ||
|
||
_allGear = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder: Move AGM_Respawn_fnc_getAllGear to Core.
Do not merge
This is not a real PR yet, but a way to see if there's any way to make this happen.
Here's the problem: the weapon classes never change, even if you remove the attachments. So if you disarm a guy who left the weapon attachments at home you still get a fresh weapon with all the attachments defined in the config. Commands to add/remove attachment from weapons stored on cargo (e.g. weaponholder) doesn't seem to exist. Neither for making a unit drop his weapon.
The only alternative I could think of is looking up the class hierarchy of the weapon and try to spawn the same weapon without attachments, but that may not be very reliable.
Any ideas??