Page MenuHomeFeedback Tracker

Can't create IR Strobes with createVehicle command
Closed, ResolvedPublic

Description

If you create an IR Strobe using the createVehicle command it won't be visible, maybe not created at all. No script errors are shown.

Details

Legacy ID
1331253399
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  1. In editor, place a unit with NVGs and set time to night.
  2. In mission, open debug console and enter:

"B_IR_Grenade" createVehicle (getPosATL player);

  1. Activate your NVGs. Notice there's no IR strobe at your location.
Additional Information

If you add an IR Strobe to the unit by using
player addMagazine "B_IR_Grenade"
in the debug console and throw it, IR will display fine.

Event Timeline

wolfenswan edited Additional Information. (Show Details)
wolfenswan set Category to Scripting.
wolfenswan set Reproducibility to Always.
wolfenswan set Severity to None.
wolfenswan set Resolution to Fixed.
wolfenswan set Legacy ID to 1331253399.May 7 2016, 6:00 PM

That's because there's no ammo type called "B_IR_Grenade". "B_IR_Grenade" is a magazine. You need the ammo. You're looking for "B_IRStrobe".

Edit: B_IRStrobe does work, it's just not in the SIX config browser. Thanks, closing ticket.

You can create Magazines using createVehicle and they'll display/fire correctly:

e.g.
Grenade
Chemlight_green
SmokeShellGreen

That said, I did try "IRStrobe" to be sure before I published the ticket and it doesn't work either.

My bad, it's "B_IRStrobe". Missed it in the configs.