Page MenuHomeFeedback Tracker

CanFire reports false for undamaged helicopter with no ammo - conflict with Biki page
Closed, ResolvedPublic

Description

Using current A3 stable build (1.36.128579) and A2CO (1.63.112555), "canFire vehicle = false" with player as gunner for an undamaged helicopter with no ammo. Try attached mission. There is no problem with this per se, but biki page

https://community.bistudio.com/wiki/canFire

says that "This command checks only the damage value, not the ammo!"

Solution: change biki page to list correct behavior, or change canFire command to report "true" for undamaged vehicle with no ammo. {F25322} {F25323}

Details

Legacy ID
1048697991
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Other

Event Timeline

OMAC edited Steps To Reproduce. (Show Details)Dec 28 2014, 4:16 PM
OMAC edited Additional Information. (Show Details)
OMAC set Category to Other.
OMAC set Reproducibility to Always.
OMAC set Severity to None.
OMAC set Resolution to Fixed.
OMAC set Legacy ID to 1048697991.May 7 2016, 8:02 PM

wiki history shows that description dating back to 2006, so its possible that hasn't been the function since a couple arma's ago. if you or someone else could test the functionality in A2, and/or OFP, i'll update the page

OMAC added a subscriber: OMAC.May 7 2016, 8:02 PM
OMAC added a comment.Dec 29 2014, 5:29 PM

Great! As the ticket description says, I already tested the issue in A2OA (actually A2CO) 1.63.112555, and the behavior is the same as in A3. I could upload an A2CO mission if you like. I have not yet tested in 1.63.125548 (current Steam stable build), but it is highly unlikely that the behavior is different than 112555 and A3.

OMAC added a comment.Dec 29 2014, 5:33 PM

Note that the comment at the bottom of the biki page:

"true even if unit is out of ammo. Only false if gun is damaged. "

is also wrong.

sorry, i must have skipped over that

It says false for me for empty helicopter regardless of whether or not it has ammo.

without units in vehicle? there is a note on the wiki page for it (returns false if no gunner)

i have an edit of that page in progress, i'll wait a bit before publishing incase theres an issue

yes without units. Or if you are in passenger seat. If you are on turret returns true even if no ammo

odd, if i set up a ah-9 or 99 w/o ammo, both seats return false; with ammo returns true with a player seated. (stable build)

OMAC added a comment.Jan 6 2015, 4:50 PM

Try the attached mission, which uses ah-99. With player as gunner, canFire reports false with no ammo. (stable build)

Killzone wrote "If you are on turret returns true even if no ammo"

This is not true for me. In my mission, if you swap the ah-99 for a ifv-6v Panther (or with any other armed vehicle, I would guess) with no ammo, canFire also reports false. The conflict with the biki page is obvious.

You assume that BIKI is wrong, fine, what do you think we should edit it to? So that whatever it says is true for every single case, heli or ground, with or without ammo, seated or not seated player. Offer your version and if it passes will edit biki and close this ticket.

OMAC added a comment.Jan 7 2015, 5:40 PM

I cannot find a situation in A3 stable or A2OA/CO where canFire shows true for an undamaged vehicle with a gunner present and no ammo. So, I think the page should read thus:

"Returns if the given vehicle is still able to fire. This command checks the damage value and ammo availability."

And the 2007 post by Bdfy should be removed.

OMAC added a comment.Jan 7 2015, 5:43 PM

Try new mission I just uploaded. Orca named a2 has full ammo. Start mission and then do radio alpha. canFire = true. Then order gunner of a2 to disembark. Then do radio bravo. CanFire = true. So the presence of the gunner is not checked by canFire, I guess. I edited the above post as to what the biki page should say. Let me know if you disagree.

Well, get in a ghosthawk and fire both guns empty, so it has no ammo (dont use setvehicleammo) then check canFire

it will be true for any seat but cargo or if player heli has no crew.

OMAC added a comment.Jan 8 2015, 2:35 AM

My last post contradicts the 2008 post on the page:

"Canukausiuka

    False if there is no gunner in the vehicle, regardless of damage level. "

So that comment should be removed also.

Another fact: canFire always reports false for a (completely) empty vehicle, even if it has full ammo and no damage. That should be added as a comment.

OMAC added a comment.Jan 8 2015, 3:32 AM

Ok, based on your findings and mine, what about this for biki page:

"Returns if the given vehicle is still able to fire. This command checks the damage value, not ammo availability (if mission started with vehicle having ammo)."

Comment: canFire always reports false for a (completely) empty vehicle, even if it has full ammo and no damage.

------------------------

But I think I have found another problem, which may have been previously reported, and which may effect this canFire issue. I have a vague recollection that I've heard about this issue before, perhaps in forums. If a mission starts with vehicle having no ammo, that vehicle cannot rearm at an ammo truck, and gunner doesn't report that he "needs ammo" to the commander. At mission init for a vehicle with no ammo, the ammo state is fixed on empty, and that is why canFire reports false even for an undamaged vehicle. That looks like a bug for sure. However, we can still edit the canFire page as I wrote above, at least until the ammo bug is fixed.

OMAC added a comment.Jan 9 2015, 2:51 AM

But canFire will return true if there is no gunner, as in my second mission and post http://feedback.arma3.com/view.php?id=22164#c85967.

changed gunner to weapon operator, better?

OMAC added a comment.Jan 9 2015, 4:57 PM

Yes, that's good. But there should be a comment in there that says something like:

"If mission starts with vehicle having no ammo, then canFire will always report false for it."

That is the issue that made me start this ticket, and that is related to the A3 bug I mentioned in above post (http://feedback.arma3.com/view.php?id=22164#c85986). When the A3 bug below is fixed, then the comment may no longer be needed.

A3 bug: http://feedback.arma3.com/view.php?id=22168

Here is post where I recognized the problem over a year ago: http://forums.bistudio.com/showthread.php?163311-Rearm-vehicles-with-ammotruck-not-working-(SP-MP)&p=2570207&viewfull=1#post2570207

added no ammo startup

OMAC added a comment.Jan 9 2015, 5:02 PM

Great! Case closed. :-)

Roehre added a subscriber: Roehre.May 7 2016, 8:02 PM
Roehre added a comment.Jan 9 2015, 9:31 PM

I can't see why this Ticked should be closed as 'canFire' is obviously broken.
I would suggest generalizing this Ticked or create a new one to keep the 'CanFire-Problem' as a to-be-fixed Ticket.
See: https://dev.withsix.com/issues/75939

Should a vehicle with 1 broken turret and 1 healthy turret return true or false on canFire?