Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Highilighting a scene Region Entity  (Read 847 times)

0 Members and 1 Guest are viewing this topic.

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 194
    • View Profile
Highilighting a scene Region Entity
« on: April 22, 2016, 11:18:56 PM »

Hello everyone

In my scenes I have mainly region entities. I am trying on MouseEntry to achieve:

- either highlight around the region entity
or
- shade the inside of the region

For instance, in my background I have a bookcase. I traced a region entity around it. Now I would like when the mouse hovers above the bookcase to have a highlighting effect.

I have tried:

Code: WME Script
  1. on "MouseEntry"
  2. {
  3.         this.AlphaColor = 255;
  4. }
  5.  
  6. on "MouseLeave"
  7. {
  8.         this.AlphaColor = 0;
  9. }
  10.  

But this doesn't have any effect.

Any ideas?
Logged

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 182
    • View Profile
Re: Highilighting a scene Region Entity
« Reply #1 on: April 23, 2016, 01:15:49 PM »

Couple of thoughts.



1. I assume the region you are talking about is an entity region ? If then you can get a simple tint effect by creating a region object below the entity/ set the region to decoration and then set up the correct colour profile to get the colour and level of transparency.

Set the default active state to false and you code would be

Code: WME Script
  1. on "MouseEntry"
  2. {
  3.     MyDecorationRegion.Active = true;
  4. }
  5.  
  6. on "MouseLeave"
  7.  
  8. {
  9. MyDecorationRegion.Active=false;
  10.  
  11. }
  12.  
  13.  
  14.  
2 Other idea, which is bit more clumsy would be to take a copy of the relevant section of the image, shade/highlight it stick it into a scene.entity and make it active on mouse over. This would be time-consuming, but it would give you good control over your graphic.
Logged

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 194
    • View Profile
Re: Highilighting a scene Region Entity
« Reply #2 on: April 23, 2016, 02:46:11 PM »

Hello eborr, thanks for the response.

I am afraid that your first proposal will not work for me. I am not using entities (coloured yellow in Scene editor), I am using region entities (coloured green in Scene editor), which are entities without a sprite. The drawing of the bookcase is part of the background and I simply traced the region entity around it. Therefore, the decoration region that I add does not have an effect on the region entity. It only affects entities with a sprite. Not a bad idea when using entities though  ;)

Your second idea would require to cut graphics from the background to create sprites for entities. Instead of going this way, I would follow your first idea instead and have normal sprites for entities and a decoration region to apply a graying effect on the entity's sprite.

I will wait though just in case someone has a solution for region entities, so I don't have to convert all region entities of every scene into normal entities.
Logged
 

Page created in 0.347 seconds with 17 queries.