Page MenuHomeFeedback Tracker

allTurrets doesn't return all turrets — it excludes drivers' turret
New, WishlistPublic

Description

As in the summary - there is not much to describe, really.

https://community.bistudio.com/wiki/allTurrets
Both variants (with true or false in 2nd argument) of the scripting command do not return [-1] - the driver's turret containing for example a smokescreen in speedboat.

Details

Legacy ID
2044557813
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  1. place Blufor's Speedboat (minigun), so you can exec some code on it
  2. execute "hint str (allTurrets [this, false]);" code on the speedboat.
  3. returned string contains array of [[0],[1]], which is missing [-1] - the driver's turret.

Event Timeline

Arkhir edited Steps To Reproduce. (Show Details)Oct 7 2015, 2:36 AM
Arkhir set Category to Scripting.
Arkhir set Reproducibility to Always.
Arkhir set Severity to None.
Arkhir set Resolution to Open.
Arkhir set Legacy ID to 2044557813.May 8 2016, 12:54 PM

so essentially you want allTurrets for a transport vehicle always return -1 since driver turret is always present?

Arkhir added a subscriber: Arkhir.May 8 2016, 12:54 PM
Arkhir added a comment.Oct 7 2015, 3:08 PM

I would like it to return an array of arrays containing every possible vehicle turret — and that includes driver's turret.

Do you think this is a bad idea? Well, the workaround is simple enough; I can always add [-1] to the array if I wish to have it there.

Technically driver turret is not really a turret, but as you said workaround is simple enough to not bother with details:

{...} forEach -1 + allTurrets tank;