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

Author Topic: (resolved) model select  (Read 2098 times)

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
(resolved) model select
« on: Jul 08, 16, 09:29:51 PM »

In any area with some models in it, when we use the 2nd Icon on top row of editor - Select (2) - then click an object it flashes redish white on the object, then sets the object box in yellow around the object.

Does anyone know which code its calling when this object is clicked on?  Specifically, I am looking for the flash of redish white of the object.
« Last Edit: Jul 28, 16, 07:31:37 PM by Thazager »
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: model select
« Reply #1 on: Jul 09, 16, 05:18:37 PM »

Since that is part of the HeroBlade interface, I would guess that is just built into the tool rather than being anywhere in code, at least not in script code.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: model select
« Reply #2 on: Jul 11, 16, 05:59:30 AM »

Thaz, do you want to mimic this behavior? Or something alse?

Any way, step by step.
client scripts - method or function:
input_mouse - OnMouseClick(lmb as Boolean, rmb as Boolean, mmb as Boolean, mb4 as Boolean, mb5 as Boolean) as Boolean

_InputHandlerClassMethods - InputDoMouseClick(who as NodeRef, left as Boolean, right as Boolean, mid as Boolean, b4 as Boolean, b5 as Boolean)

_InputHandlerClassMethods - InputClientMouseCallbacks(args copies Class _MouseEvent)

In HeroBlade it also call:

_InputHandlerClassMethods - _HeroicOnMouseClick(lmb as Boolean, rmb as Boolean, mmb as Boolean, mb4 as Boolean, mb5 as Boolean) as Boolean

and

_InputHandlerClassMethods - _HeroicOnSelectNodes(nodes as List of NodeRef)

Look this method/functions in those scripts. Maybe you find what you want.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: model select
« Reply #3 on: Jul 11, 16, 01:09:58 PM »

Yes, those are the scripts/functions I have been looking thru, of which they don't appear to be showing which function is actually doing the high lighting.
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: model select
« Reply #4 on: Jul 13, 16, 05:11:10 PM »

the highlighting is called from the server itself to begin with(EditHandlerClass), which ends with a call to the baseClientClass on the calling account,  to "selectNodes"
 or "selectNode".
The highlighting only takes place on the blade, in the client it will result in a "gray" image of the "gizmo" frozen on screen which won't go away until you relog the client.

To use that type of functionality in the game itself, you'd want to use mouseclick/mouseenter etc and alter the texture/color of the node (which can be gotten using functions like GetNodeUnderMouse etc like the mouse functions do).

NOTE: The highlighting in question is part of the blade itself, and not in HSL.  Only the calls to trigger it are in HSL, called from the SelectNodes method.

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: model select
« Reply #5 on: Jul 13, 16, 07:07:59 PM »

Yes, that is how we currently have it set up with mouse enter and mouse leave. At present since the values are set to 1,1,1 making it as bright as possible, the only settings with color would be making 1 or more of those RGB darker in color using something less than 1, like 0.999 to 0.0001
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: model select
« Reply #6 on: Jul 13, 16, 07:15:57 PM »

there are a number of things you could add for highlighting, for example, for a generic outline, you could create a texture with transparency of a halo effect, or square outline etc, and when mousing over an object, create a billboard using your texture, and attach it to the object.  then destroy it when the mouse leaves the object.  other than changing its color (diffuse/ambient), you're pretty much looking at extra artwork for it.  You could also possibly create a function which would grow/shrink the object a bit, giving it a scripted animation while hovering over it..  haven't tried that yet, so not sure how resource intensive that would be.

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: model select
« Reply #7 on: Jul 13, 16, 09:07:41 PM »

Yes, that is how we currently have it set up with mouse enter and mouse leave. At present since the values are set to 1,1,1 making it as bright as possible, the only settings with color would be making 1 or more of those RGB darker in color using something less than 1, like 0.999 to 0.0001
With static models, you can set the RGB values of the diffuse and ambient values to greater than 1 for brighter highlighting.  I don't know if this works on character models.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: model select
« Reply #8 on: Jul 13, 16, 10:40:48 PM »

Quote
With static models, you can set the RGB values of the diffuse and ambient values to greater than 1 for brighter highlighting.  I don't know if this works on character models.

Yep, it will work with char models as well.

for example try : "#14,14,14,1" for diffuse/ambient value (pretty bright but a good demo)
« Last Edit: Jul 13, 16, 10:46:32 PM by ToY-Krun »
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: model select
« Reply #9 on: Jul 28, 16, 07:31:07 PM »

Thanks, that looks very close to what I was seeing in the highlite with click function.

(just noticed this, as I logged in, it showed as new content added)
Logged