HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] How to send OnMouseEnter to server?  (Read 1559 times)

azhwkd

  • Developers
  • *
  • Posts: 22
    • View Profile
[Resolved] How to send OnMouseEnter to server?
« on: Jan 15, 12, 09:46:24 AM »

I saw the OnMouseEnter event in the Input_Mouse script.
Now in my game i would like to control the targeting with those events (OnMouseEnter and OnMouseLeave).
How would i implement that those events get passed on to the server? I thought about overriding functionality in the client side _InputHandler script to add the server call to InputDoMouseEnter. But i dont know if that's a good idea.

Has anyone already done this or could give me a lead on how to implement this properly?

Thank you.
« Last Edit: Nov 01, 12, 03:51:42 PM by HE-Cooper »
Logged
join us on IRC!
irc.freenode.net - #HeroEngine

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: How to send OnMouseEnter to server?
« Reply #1 on: Jan 15, 12, 10:05:20 AM »

It looks like you could go ahead and modify the client function ServerMouseEvent() to handle other events like Enter and call that from InputDoMouseEnter().  Then, of course, modifying ServerMouseEvent() on the server side as needed.  I would think that should work fine.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

azhwkd

  • Developers
  • *
  • Posts: 22
    • View Profile
Re: How to send OnMouseEnter to server?
« Reply #2 on: Jan 15, 12, 10:12:00 AM »

Thank you for your input :)
That sounds like my first idea  :D
So i would just create a new client side class which i GLOM onto the INPUT client system node.
The class script would then just contain a copy of _InputHandler with my specific changes, right?
Logged
join us on IRC!
irc.freenode.net - #HeroEngine