Jump to content
Sign in to follow this  
xjoker_

How to get the unit you hit

Recommended Posts

Hello,

 

I'm searching the best way to get the unit that was hit by an other.

For now i'm using the eventhandler HandleDamage on a unit, and when it's hit, I remoteExec a message from the unit to the other (that was shooting).

When the other receive the message, he gets a hint : "You hit someone"

 

Is there a "faster" way to do that ? Because I didn't test yet in MP but I guess that with many players, there could be a delay (due to remoteExec) between the moment when you shoot someone and when you get the hint. 

Share this post


Link to post
Share on other sites

I don't think that you'd run into issues with using the EH + remoteExecCall even with a larger player count, especially if you only display a hint that somebody hit someone.

 

You'll want to make sure you execute the hint only on the machine where the hint is needed, which in this case is the person that shot somebody. In addition to that make sure you use remoteExecCall (not remoteExec).

  • Like 1

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  

×