Jump to content
Sign in to follow this  
Reezo

How to detect when you are aiming your weapon at a specific unit?

Recommended Posts

Hello everybody,

I am trying to improve the IED detection and disposal script and I am now working on suicide bombers or triggermen.

I would like to make it so that a triggerman does not trigger a remote bomb when at least one soldier is keeping his gun aimed at him.

I would need this to simulate the fact that you are searching his car or his surroundings while one of the guys in the team keeps the suspected person aimed to prevent him from doing something dangerous (like triggering the bomb).

How could I do that? With CursorTarget maybe?

Any help is highly appreciated,

Share this post


Link to post
Share on other sites

Well you already gave the answer yourself!

So yes CursorTarget is the right choice.

As i suppose u dont need to take care for distances < 200m, it will work .

Share this post


Link to post
Share on other sites

Thanks! It works, actually. The problem was a bad interaction between the caller script and the actual script with cursorTarget.

Edited by Reezo

Share this post


Link to post
Share on other sites

NOTE: cursortarget only works when the knowsabout is 4 and range is within 50m.

Oh my, this was due to a distance check in the script i used awhile ago...

Sorry for the confusion.

Edited by Demonized

Share this post


Link to post
Share on other sites

Cannot confirm this. Range works over 500m here.

A certain knowsabout level seems needed, yet 1.6 works here for the 500m one.

Share this post


Link to post
Share on other sites

@PvPScene - You are right.

Edited by Demonized

Share this post


Link to post
Share on other sites

No worries mate - thanks to the confirmation. :)

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
Sign in to follow this  

×