Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Distinguishing Entity from RegionEntity  (Read 2335 times)

0 Members and 1 Guest are viewing this topic.

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Distinguishing Entity from RegionEntity
« on: March 28, 2010, 04:05:07 PM »

Hi Mnemonic,

please, is there a way how to programatically distinugish in between the aforementioned? ent.Type always returns entity.

Thank you very much!
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Distinguishing Entity from RegionEntity
« Reply #1 on: March 28, 2010, 04:47:08 PM »

Entity.Region property will contain null if it's not a region entity.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Distinguishing Entity from RegionEntity
« Reply #2 on: March 28, 2010, 05:01:23 PM »

Thank you. Just to be sure: Even if I use dynamic region creation in entities (theora buttons)?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Distinguishing Entity from RegionEntity
« Reply #3 on: March 28, 2010, 08:10:36 PM »

It doesn't matter. As long as the entity has a region assigned, it's accessible using the .Region property.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Distinguishing Entity from RegionEntity
« Reply #4 on: March 28, 2010, 09:32:28 PM »

so in that case it's not possible to distinguish that.

Thank you again.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Distinguishing Entity from RegionEntity
« Reply #5 on: March 28, 2010, 09:35:42 PM »

I don't understand. It's legal for an entity to have both sprite and region. You can query both using script.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Distinguishing Entity from RegionEntity
« Reply #6 on: March 28, 2010, 09:39:09 PM »

I am traversing all scene entities in a loop layer by layer. I am making an internal index based on the fact if the node is Entity, not region entity.

Your recommendation was to test for Region attribute. If it's null, I wouldn't index. This works for regular entities / region entities. But I also have theora entities which have regions dynamically assigned so they are clickable.
These entites will never get indexed because their Region attribute is not null.

 
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.025 seconds with 20 queries.