Comrades in Arms Discussion Board

Full Version: WGL CAS target - name?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anyone know the name of a CAS target, the one that is created when you place it via wgl radio that you carry?

AI aircraft won't attack it (I've tested thouroughly), it only shows up as a red target dot on the radar, when you are in a vehicle or aircraft. But, AI aircraft do attack the wgl invisible targets.

So, what I wanted to do was have an invisible armour target placed in the corner of the map somewhere, and have a trigger so that when a CAS target is placed by the wgl radio the the invisible target gets "setpos"ed to the CAS target location. This would make a cool simple airstrike function that you could call in on any position...

For this I guess I need the name of the CAS target when it is created, anyone know it or where to find it?
It should be included in the documentation. If not I'm sure it is mentioned somewhere in the WGL FAQ website. Do you have the link? I can send it to you later this day.

The CAS target fired / placed from the radio weapons is an IR target which can be targeted like a laser designated target but only from human pilots. At least that's how I remeber it from the aforementioned FAQ page.

Are you going to use a script to guide the CAS plane to the required position? I wouldn't give a rats ass about AI pilots when it comes to CAS. Mandoble's air support scripts are very nice.
could only find this so far...

Question:
What does CAS targeting do?

Answer:
When used it will put an invisible target onto the ground. This is useful for pilots in A10s or other choppers. They can use it as a reference point to drop a bomb or shoot at with rockets.

  Note that it's no laserTarget object - it's only an irTarget.




Question:
What do the other radio commands do?

Answer:
The Reinforce command is useful if a mission maker wants to use it to trigger vehicle respawns. It can be built into a mission if you monitor the status of the public variables, WGLReinforceW and WGLReinforceE. The radio command sets them as true and sets it public. So if you want to use it in a mission, do something like ?(WGLReinforceW): goto "respawnvehicles". Be sure to set the variable false when you're done though!
The Insertion command is currently not used but in the future it may be used to a mission maker to allow a team to specify multiple respawn points. This is handy if you're trying to avoid spawn control.


Yeah that's what I meant but it does not answer your question (and apart from that it proves my previous statement wrong about the CAS target being an IR target which works like a laser designator target - it's only an IR target).

Well what you could do is to backtrace through the WGL addons to find the script responsible for placing said IR target. My bet is it is located somewhere in wgl_events.pbo or wgl_zm.pbo
Alternatively you could place a marker on desert island and add a trigger activation "Alpha" repeatedly, on activation:
Code:
hint format["%1", typeOf (nearestObject getMarkerPos "name_of_placed_marker")]
Fire the CAS target weapon, click the marker on the map and then use the radio trigger. The hint should display the class name of the IR object.

Edit: just tried the above myself et voilá: "WGL_CASTarget" is the name
Could have found out that one with a well educated guess  Wink

I think it would be more useful to intercept the position of the CAS target instead. Would be much more useful to be used with third party air support scripts than the name of the target.
Getting close but that's still not it.....

the typeof command only tells the type of object, which is wgl_castarget. What I need though is the name of that particular wgl_castarget after it is created, bcause I can't setpos getpos an object to wgl_castarget...

I tried this:

Code:
hint format["Unit's name: %1", (nearestObject getMarkerPos "marker1")]

and it gives some number but I can't seem to use this number as an ID or name...

Maybe need to use the name command somehow?

http://community.bistudio.com/wiki/name

But the comref seems very sparse regarding this command... ???
That's right because the "WGL_CASTarget" is placed with a script inside wgl_events.pbo (I backtraced it already) and it is only stored within this script in a local variable and will not be populated into any global variable like the reinforcement radio weapon does.
... well that sucks. It isn't detected by Anybody trigger either, like the normal laser targets.