Jump to content

How to know a unit has TGP or Jammer? Unit.getAmmo() only shows weapons..


Recommended Posts

Posted (edited)

Hello, I am new to mission scripting, but I searched the forum for hours and still has no solution.

 

 

I am trying to restrict giving a player TGP or Jammer modules, however, getAmmo() only returns weapons and somehow getSensors() doesnt return anything..

 

 

Any help or workaround would be useful. I mean, TGP is a big deal, and nobody should take it for granted! :lol:

Edited by zakk95
Posted

You don't.

 

A few aircraft actually have the rendering of a targeting pod on them as part of the aircraft model and not a weapon that gets attached to the model. For instance the F-14B is like this with the Lantirn. So for objects that do it this way you can use Unit.getDrawArgumentValue to check. You'd have to load up the model viewer or possibly the units payload definition files to find the argument value.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
You don't.

 

A few aircraft actually have the rendering of a targeting pod on them as part of the aircraft model and not a weapon that gets attached to the model. For instance the F-14B is like this with the Lantirn. So for objects that do it this way you can use Unit.getDrawArgumentValue to check. You'd have to load up the model viewer or possibly the units payload definition files to find the argument value.

 

Again, great thanks Grimes!

So maybe there is a way, albeit not so beautiful one :smilewink:

I will try that and find out! You are the best!

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...