Jump to content
Devastator_cm

laserTarget not working?

Recommended Posts

Hi Guys,

any idea why following script gives objNull instead of the object which has laser on it?
In strider commander laser is on and pointing to another vehicle while script i running

 

while (alive player) do
{
    _Target = laserTarget commander (vehicle player);
    hint format ["Target Typ: %1 - Target Name: %2", typeOf _Target, _Target];
    sleep 0.1;
};

Share this post


Link to post
Share on other sites

First, you must write while {alive Player} do ...

Second, strider is a resistance (independant) vehicle and it seems to fail for the laserTarget command.

 

Some added hints:

There are some vehicles (in cfgVehicles) created for making a "fake" enemy for AI to fire at.

This way,  laserTargetW will be always side 0 (OPFOR) and laserTargetE will be always side 1 (BLUFOR).

So, when a BLU unit lase a point, a laserTargetW is created at pointer, and this is an enemy (east side) as far as these sides stay enemy (see setFriend).

 

There are also two other vehicles : LaserTarget (not the command here) and laserTargetC, side 3 (civilian). Don't ask me what for.

 

As you can see there is no laserTargetR (for resistance or I for independent). The resistance units are using some laserTargetW or laserTargetE along with their allegiance.

 

The laserTarget command (and your corrected script) work fine so far I tested with BLU or RED vehicles (infantry or else) or even GREEN infantry, lasering some object. On the other hand, that definitely doesn't work for strider. Seems to be a bug or more exactly, a non-implemented feature.

 

Share this post


Link to post
Share on other sites

() is typo here it is not the one in game which I used otherwise I would get the error message with Line information ;)
Thanks for the added hints part though. That might help me on my goal

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×