Got repro steps?
- Queries
- Arma 3 Activity
- All Stories
- Search
- Advanced Search
Advanced Search
May 10 2016
Just spoke with developer, this is intended behaviour. The class of the weapon doesnt change when you remove or add attachments.
My suggestion would be, always use base classes and if you want to add attachments you can always do that after you added weapon. Or use event handler to detect when attachment is separated and replace weapon class? In any case this is open for debate and further improvement.
EDOT: there are also weaponsItemsCargo and weaponsItems commands.
So shall I resolve this ticket as no bug, since getWeaponCargo works as it should and the problem is with how guns with default attachments are handled by the engine?
Cannot confirm.
wh = "weaponholdersimulated" createvehicle position player;
wh addWeaponCargoGlobal ["hgun_P07_F", 2];
wh addWeaponCargoGlobal ["hgun_P07_snds_F", 2];
hint str getWeaponCargo wh;
[["hgun_P07_F","hgun_P07_snds_F"],[2,2]]
Our latest intelligence confirms that japa has this on his to do list. Unfortunatelly this is all we have received before transmission got cut off...
While I believe there should be command like this, there is a workaround
Give your unit name, for example: soldier1
Give your unit description, for example: "Heli Gunner"
In init field put: this setVariable ["soldier1", "Heli Gunner"];
to get description in game use
_unit getVariable vehicleVarName _unit
Perhaps better to ask this on the forums.
Updated repro works for me no problem.
You maybe need to verify cache or something.
works for me
oneachframe {hintsilent str diag_frameno}
PC screen can also get alt texture, just checked. Marking resolved.
Have you tried it? I know setting on TV works.
That is what this FT is for.
Just tested myself, fences have some strange behaviour, my guess because of map optimisation. They cannot be hidden either. Knocking fence over and then setting damage to 0 might or might not put it up again. allowdamage and enablesimulation both have no effect.
allowDamage should be executed on all clients for static objects and enableSimulation should be enableSimulationGlobal if you limit it to the server otherwise must execute on all clients too if just enableSimulation.
+1 On Stratis asphalt roads are classified as dirt roads
would this do? http://feedback.arma3.com/view.php?id=13750
I can confirm this, but simple repro is always nice.
When object is supplied but not a position, the position is taken from object, otherwise the position is taken from supplied position. That doesn't mean that when position is taken from object it is going to follow object when it changes position. The sound is generated at object position and it stays there.
Use
RscMapControl or
RscMapControlEmpty
RscMap is not what you think it is.
Changed to config, as base classes are missing essential params like x in this case.
As far as this ticket is concerned, this was not a bug.
@LeaKS123 your issue seems to be different. Please create new ticket and attach detailed repro.
exactly, currentDriver command is needed because of copilot enabled vehicles
Here is a kind of pseudo work around
this addAction ["", {
_this select 1 action [
["EngineOn", "EngineOff"] select isEngineOn (_this select 0), _this select 0
];
}, "", -10, false, true, "User1", "_this == driver _target"];
this addAction ["", {
_this select 1 action [
["CollisionLightOn", "CollisionLightOff"] select isCollisionLightOn (_this select 0), _this select 0
];
}, "", -10, false, true, "User2", "_this == driver _target"];
engine is bound to User Action 1
collision light to User Action 2
unfortunately there is no way to detect if copilot is current driver so this will not be available for copilot. Also it for some reason adds actions with no text to scrolling action menu so you will get 2 non selectable items added
On DEV there is setMagazineTurretAmmo command so you will have to wait until next stable.
Try BIS forums http://forums.bistudio.com/index.php
Thanks
Try BIS forums http://forums.bistudio.com/index.php
Thanks
Early Christmas gift? :)
"Polease Bohemia ;) Early Christmas gift..fix what you broke :P Noany hard feelings."
Your comment is incredibly annoying. What exactly are you asking for?
- spawn { player removeprimaryweaponitem "30Rnd_65x39_caseless_mag"; works sleep 1; player addprimaryweaponitem "30Rnd_65x39_caseless_mag"; works sleep 1; player removeprimaryweaponitem "1Rnd_HE_Grenade_shell"; works sleep 1; player addprimaryweaponitem "1Rnd_HE_Grenade_shell"; doesnt add back
}
this also doesnt work
player addweaponitem [primaryweapon player, "1Rnd_HE_Grenade_shell"];
This also doesnt work
player addWeaponItem [currentWeapon player,["1Rnd_HE_Grenade_shell",1,currentMuzzle player]];
same as this
player addWeaponItem ["arifle_MX_GL_ACO_F",["1Rnd_HE_Grenade_shell",1,"GL_3GL_F"]];
doesnt add either
and...
player addprimaryweaponitem ["1Rnd_HE_Grenade_shell",1,"GL_3GL_F"];
generic error in expression
Thank you master! there is this another issue...
player addWeapon 'launch_B_Titan_short_F';
player selectWeapon 'launch_B_Titan_short_F';
player addSecondaryWeaponItem (getArray (
configFile >> "CfgWeapons" >> 'launch_B_Titan_short_F' >> "magazines"
) select 0);
player gets launcher and it has magazine but there is a reload time delay
any chance to skip the loading bar?
reload immediately = true?
Maybe it will be better to expand existing addXXXWeaponItem, removeXXXWeaponItem to include magazines, since they already deal with cargo space of the weapon.
done!
Oh, that ticket again... http://feedback.arma3.com/view.php?id=7804
Are you executing it where vehicle is local? Tried it just now with Huron and MH9 on dedi, works like charm.
Takes about 60 sec for the launcher to become usable for me. Removing and adding weapon cuts this time to 2 sec
vehicle player removeMagazineTurret ["smokelaunchermag", [0,0]];
vehicle player removeWeaponTurret ["smokelauncher", [0,0]];
vehicle player addMagazineTurret ["smokelaunchermag", [0,0]];
vehicle player addWeaponTurret ["smokelauncher", [0,0]];
It is your ticket, if you think it is not resolved then it is not resolved. As for "why not" commands, I know first hand how difficult it is to get even essential commands added or to fix broken ones. On the other hand, stranger things have happened in the past.
So can we consider this resolved?
What about
uniformContainer player addMagazineCargoGlobal ["30Rnd_65x39_caseless_mag", 3];
Any good?
Or even
uniformContainer player addMagazineAmmoCargo ["30Rnd_65x39_caseless_mag", 3, 2];
if you want custom ammo count?
Yes it fails on Altis and on Stratis. You can use
nearestObject [player, "house"];
in the mean time
Works for me, just tested. Would you mind to post a repro?
Or try this:
Go on VR map, execute
"Land_u_House_Small_02_V1_dam_F" createvehicle position player;
then
hint str nearestBuilding player;
Have you already tried http://community.bistudio.com/wiki/setSystemOfUnits ?
0.00089s (0.89ms) in the middle of a forest for me with 30 radius (22 trees counted)
what about:
trees = [];
{
if ((str _x) find ": t_" > -1) then {
trees pushBack _x;
};
} forEach nearestObjects [player, [], 100];
I had to load arma3.exe into hexeditor to read the rest.
EDIT: I see, compile does fail.
It seems all str command does is it places "" around the argument, that's all.
Because str deals with double quotes only you can use single quotes
_value = '--->""<---';
to work around the problem, or use format and form the string you send to extension exactly the way you want.
I doubt this is going to change as this is ancient command and it may break too many scripts. What needed is new command, parseString that would correctly parse all escaped " within.
Looks exactly like it should, what were you expecting the result would be?
closing in favour of duplicate #24048
Also see this ticket http://feedback.arma3.com/view.php?id=22179 setMagazineTurretAmmo locality is also broken
magazineTurretAmmo needs more work, there is a ticket already for that and afaik developer knows about it. What final version will be like we have to wait and see. Resolving this ticket because requested command exists
Oh, I see, you want to set it from the editor INIT, then you must disable randomisation:
this setVariable ["BIS_enableRandomization", false];
this setObjectTexture [0,"#(rgb,8,8,3)color(1,0,0,1)"];
works for me
suv setobjecttexture [0,"#(rgb,8,8,3)color(1,0,0,1)"]
makes it red
What about setMagazineTurretAmmo? ATM available on dev only.
I will, when it is fixed: http://feedback.arma3.com/view.php?id=21331
Resolved at OP's request
Because setVehicleAmmo tops up ALL weapons, what should getVehicleAmmo return after you have all weapons topped up but 1 weapon empty?
I am not talking about executing setVehicleAmmo 1 and then immediately call getVehicleAmmo, in this case it is fairly obvious what result would be. Im talking about having different amount of ammo in weapons after they have been used. What should getVehicleAmmo return? If main gun has 0 ammo, of one type, 30℅ ammo of another type and secondary gun has 99% of ammo. What should getVehicleAmmo return, a single number from 0 to 1 that is somehow meaningful or useful? Saying just because there is set variant there must be get variant is not enough I'm afraid in this case.
What Benargee said, why do you need this command?
weapon doesn't disappear any more, but when weapon is remote WeaponDisassembled EH still never triggers
There is also another bug with duped weapon backpack
The issue is still an issue. What's more when weapon is remote and gets disassembled and assembled back and disassembled again, EH still doesnt fire.
Strangely WeaponAssembled EH does trigger, but as ticket says the mortar disappears after 10 or more seconds
@caliban55 thanks for the tip, but as mulledk said, at least moveout should work.
Ok, will resolve it than unless there is something else
You can use weaponAccessories command for it
_silencer = player weaponAccessories currentMuzzle player select 0;
hasSilencer = !isNil "_silencer" && {_silencer != ""};
Is this satisfactory?
It is up to mission maker https://community.bistudio.com/wiki/enableSaving
Ok, as you wish, I am unresolving this.
I think this is more of a config issue, as we do have the means to retreve this informatin whenever alvailable. Would you like to make another ticket regarding config problem?
The command is selectionPosition, the problem is the absense of actual selections for the seats.
On further testing, selectionPosition can be used to retrieve memory point positions just fine. Those could be found in config
MH-9
heli selectionPosition "pos driver";
heli selectionPosition "pos codriver";
heli selectionPosition "pos cargo lf";
heli selectionPosition "pos cargo l";
heli selectionPosition "pos cargo lr";
heli selectionPosition "pos cargo rf";
heli selectionPosition "pos cargo r";
heli selectionPosition "pos cargo rr";
Going to resolve this.
Duplicate #21163
Duplicate of #21141
Is playing with your friends the main factor here or does this happen on others servers too?
The problem here is that 1st person view doesnt match 3rd person. Current 3d person shows player aiming down sights at all times even if he is hip firing. Bringing weapon chest level when not in ADS, just like 1st person shows, in 3rd person would already make it less hostile and more distinguishable for an observer.
Just to add. If I save assignedItems into array and store it for later and then I want to restore those items into respective slots, Binocular, Rangefinder or Laserdesignator will fail. I will need to screen assignedItems for Binocular, Rangefinder or Laserdesignator and remove those.
Alternatively excluding Binocular, Rangefinder or Laserdesignator from items and assignedItems and add/removeItem would also solve this ticket, however at this time this may already cause too many scripts to break.
Oh I see, means Weapon_Empty now can show multiple items. Thanks. That note on CL was actually quite vague. Thanks again.
"It has been actually done on 28/11 in dev branch by this change, could You, please, give it a try?"
wh = "GroundWeaponHolder_Scripted" createvehicle position player;
hint str wh; //<obj-null>
Yeah, this is great, but this will only solve the autodelete bug with Weapon_Empty class. The problem I see is that Weapon_Empty inherits from WeaponHolder_Single_F, which would only show 1 item, where as GroundWeaponHolder_Scripted would behave as GroundWeaponHolder and show multiple items.
Also off topic, is there a way to make _Single weaponholders to be limited to single items?
Just to add WeaponHolder_Single_limited_magazine_F for example that is both single and limited has
transportMaxItems = 0;
transportMaxMagazines = 1;
transportMaxWeapons = 0;
params will still allow to place > 1 magazines in it both with script and UI
wh = "WeaponHolder_Single_limited_magazine_F" createvehicle position player; wh addMagazineCargoGlobal [currentmagazine player, 5]
Since handlescore is now triggered for addscore, this is logical outcome - endless loop
It is not the count. pushBack has been expanded and returns the index of last element inserted, which is Number, and count expects either Nothing or Boolean.
b = []; {0 = b pushBack _x} count allUnits
assigning result of pushBack to 0 will make it return nothing.
well with setVelocityTransformation, you set start position and orientation of the object, end position and orientation of the object and then you change the last param from 0 to 1 and the object will move from start to end. How smooth depends on the step you will use iterating from 0 to 1
There is setVelocityTransformation for for these kind of things
there was recent note on changelog, stating that HandleScore can now be triggered by script. This was added deliberately, addScore didnt trigger handlescore before.
Dont forget badmin and madmin :-)
@highhead you can make it call back the function you need after check. But yea isAdmin is needed, I see Iceman is on the case!
"You still cannot use #kick playerID or #kick playerName."
Yes you can
pressing the kick button on the map will kick you by uid:
with uiNamespace do {
ctrl = findDisplay 12 ctrlCreate ["RscButton", -1];
ctrl ctrlSetPosition [0,0,0.5,0.1];
ctrl ctrlCommit 0;
ctrl ctrlSetText "Kick";
ctrl ctrlAddEventHandler ["ButtonDown",
{
if (serverCommandAvailable "#kick") then { serverCommand format ["#kick %1", getplayeruid player]; } else { hint "You need to be logged in as admin to do this"; };
}];
};
Actually just managed to make both commands work, so don't panic. Hold on while I wrap it in some script solution.
Yep, the good news is you can execute admin commands kick, lock etc, which work when executed from UI event handler, i.e. button push, UI load etc. So one can make own admin interface available to anyone, but only logged in admin can use it.
here is my "hacky" way to execute those commands:
with uiNamespace do {
ctrl = findDisplay 46 ctrlCreate ["RscMapControlEmpty", -1];
ctrl ctrlsetposition [0,0,0,0];
ctrl ctrlCommit 0;
eh = ctrl ctrlAddEventHandler [
"Draw", { with uiNamespace do { hint str servercommandavailable "#logout"; ctrl ctrlRemoveEventHandler ["Draw", eh]; 0 = ctrl spawn { disableserialization; ctrlDelete _this }; } }
];
};
but as zx64 suggested, isAdmin might be a good solution for simplicity