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

Author Topic: How do you get mouse input on a prop?  (Read 1100 times)

NestEggs

  • World Owners
  • ****
  • Posts: 24
    • View Profile
How do you get mouse input on a prop?
« on: Mar 24, 14, 08:32:58 PM »

Hi folks,

More props system confusion. I have added a new prop spec (#2) and set the decorators to _PropSpec, _PropVisualizationDecorator, _PropMouseTargetableDecorator. How do I get access to the mouse events on the prop?

Thanks,
Chris
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: How do you get mouse input on a prop?
« Reply #1 on: Mar 25, 14, 02:02:04 PM »

Take a look at space shooter reference world. The Asteroid system is all prop based.
Logged

NestEggs

  • World Owners
  • ****
  • Posts: 24
    • View Profile
Re: How do you get mouse input on a prop?
« Reply #2 on: Mar 29, 14, 08:52:25 PM »

It turns out that I added the prop command as explained here http://hewiki.heroengine.com/wiki/Prop_System to an EXISTING asset. This caused two asses to be loaded. First the asset described in the command and a second instance directly over top which didn't have any classes glommed that could do input. It took me a long long time to sort this out. The correct way to do this is to add a new command to the asset library. Right click in the whitespace area -> Add Command then paste the heprops command:

Code: [Select]
[code]/heprops library #spec='5'  #fqn='\world\livecontent\Resources\TestModels\IceBlock1.hgm' #position='$POSITION' #lod='10'[/code]

I would be happy to add this to the wiki if someone wanted to give me edit perms ;)

-C
Logged