HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.
Pages: 1 [2]

Author Topic: Props and Glomming  (Read 3670 times)

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: Props and Glomming
« Reply #15 on: Jul 23, 14, 11:15:19 AM »

It is a client script, so that could be the problem. I was wondering if, when you GLOM a class onto an object, does it GLOM both client and server side scripts?

You said before "if its not a clickable item and needs to be perform glom , if it already is then the fields are there already".  Doesn't this mean the object still needs a script attached to it?


Also, you said:
Short hack method to make object clickable , place a asset in game , then use the get node under mouse routine when the player clicks to interrogate what the player is clicking on. use FQN to filter , and then have that launch a GUI window.

This is where I don't follow: using the get node under mouse, wouldn't that be in a script, and where would that script be if not attached to an object?
Logged

WorldWideZ

  • World Owners
  • ****
  • Posts: 524
    • View Profile
    • World Wide Zed
Re: Props and Glomming
« Reply #16 on: Jul 23, 14, 01:15:32 PM »

i think under input_mouse , basically you want to listen for mouse events , when you receive one check to see if its a HBNode if it is get the FQN and compare it against the FQN of the model you are expecting a event for, if it is launch a gui window or some other action.

I think gloms might automatically propagate from the server , but i might be wrong. We tend to use inheritance over gloms. i would also look into the event system nature of hero engine, its very handy :D



Logged

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: Props and Glomming
« Reply #17 on: Jul 24, 14, 12:15:23 PM »

I've been searching and I haven't found even where to start on the input_mouse concept. Are you saying that there will be a frame by frame check to see what object the mouse is over and if it is an HBNode of a specific FQN (for example rock.hgm) then it will fire a script (for example, to make the object hightlight)?
Logged

WorldWideZ

  • World Owners
  • ****
  • Posts: 524
    • View Profile
    • World Wide Zed
Re: Props and Glomming
« Reply #18 on: Jul 24, 14, 02:17:30 PM »

the method you talked about using before in http://hewiki.heroengine.com/wiki/Your_First_HSL_Script is per frame. in fact its doing exactly what you described.
Logged

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: Props and Glomming
« Reply #19 on: Jul 24, 14, 03:37:55 PM »

Ok, and that's where I have the problem. It's a client side script so it isn't persistent, which brings me back to my original question, how do I make it persistent when I use that method? :)
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1155
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Props and Glomming
« Reply #20 on: Jul 24, 14, 07:02:26 PM »

There are a few ways to make objects persistent. One way is by loading the data each time, and then pulling specific data to change the object into the way it should be by storing that data in a system area. An example would be making a cube, and then getting the data to set the size, color, position, rotation, and other things from the system area. When making such an area, after setting up the area and data, the world needs to sleep (reset), them upon waking it will be persistent. Using this way, you can also add a script call to set it.

Another way is making the object in max or maya and then adding that object to the edit instance of that area.
Logged

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: Props and Glomming
« Reply #21 on: Jul 25, 14, 12:23:24 AM »

Thanks Thazager! Do you know how I can set it up so the mouse will detect when it is over an object and fire a script when I click on the object, similar to how the mouse works on a gui? This would be client side and would probably solve most of my problems if I could figure out how to make the mouse always be checking for objects in the world. It would have the added bonus of making the client do the checking which would reduce stress on the server.

My main problem is I can do a lot of the scripting, I just don't know how to make those scripts respond to anything when the client loads. In Unity game engine it was a simple matter of drag the script onto an object and it just works. That is a single player system, and HE is Server and Client which is new to me. :)
Logged

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: Props and Glomming
« Reply #22 on: Jul 25, 14, 03:00:51 AM »

WorldWideZ said this:
Short hack method to make object clickable , place a asset in game , then use the get node under mouse routine when the player clicks to interrogate what the player is clicking on. use FQN to filter , and then have that launch a GUI window.

This  is exactly what I am trying to figure out. The problem is how do I set up the whole "get node under mouse" to work on 3d objects instead of GUI's?
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1155
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Props and Glomming
« Reply #23 on: Jul 25, 14, 03:32:36 AM »

There is a tutorial on setting up something like for when a player clicks on objects in the world. The Physics node sets some of the parameters, while this Physics minigame demonstrates it.
Logged

Amarak

  • General Accounts
  • *
  • Posts: 281
    • View Profile
Re: Props and Glomming
« Reply #24 on: Jul 25, 14, 01:11:42 PM »

Thank you for the reference. While the Physics will come in handy later, it still doesn't help me with the actual mouse to target/select an object to fire a script. I know it has to be something easy, I just can't seem to locate it. I'll look around player controls, the Monkeytok is one thing that can be clicked on but it is a /henpc node.
Logged
Pages: 1 [2]