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: What is the alpha threshold?  (Read 6342 times)

0 Members and 1 Guest are viewing this topic.

Slav

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
What is the alpha threshold?
« on: March 17, 2011, 04:08:01 PM »

Hello.
When engine tests hit point on "click" which alpha value means that object was clicked? I mean how much alpha is it need for image to have to be clickable?
Alpha varies from 0 to 255.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: What is the alpha threshold?
« Reply #1 on: March 22, 2011, 09:28:04 AM »

Alpha < 128 is considered transparent.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Slav

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
Re: What is the alpha threshold?
« Reply #2 on: March 22, 2011, 11:10:48 AM »

Thank you.
Logged

Slav

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
Re: What is the alpha threshold?
« Reply #3 on: April 19, 2011, 09:54:43 AM »

Hmm... I have the glass jar which is almost impossible to click within my ported version (original C++ engine permits to click this jar well) - it's alpha is near 60. May be there is some logic which intends to apply click on even transparent object in case there are no objects below it?
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: What is the alpha threshold?
« Reply #4 on: April 19, 2011, 10:29:09 AM »

You can add a region entity on top of the object in SceneEdit.
Logged
fl*p

Slav

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
Re: What is the alpha threshold?
« Reply #5 on: April 19, 2011, 10:36:49 AM »

The problem is that I port already written game from original WME to Flash (AS3) version and I must simulate whole it's behavior.
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: What is the alpha threshold?
« Reply #6 on: April 19, 2011, 11:10:32 AM »

Adding the region entity will make the object clickable which, as I understand it, it's the behavior you want?
Logged
fl*p

Slav

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
Re: What is the alpha threshold?
« Reply #7 on: April 19, 2011, 01:38:22 PM »

I must not edit game's source scripts - I must port it from original WME implementation to FLASH one "as is".
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: What is the alpha threshold?
« Reply #8 on: April 19, 2011, 01:55:02 PM »

Slav, yes. if there is region entity in that scene in question, covering the image, the full shape of that region is clickable. Also if the image in question is not image but sprite, it's possible to turn off pixel perfect which again allows the full shape to be clickable.
« Last Edit: April 19, 2011, 02:01:15 PM by metamorphium »
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet
 

Page created in 0.023 seconds with 24 queries.