Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Checking for existance of a dynamically created entity  (Read 2507 times)

0 Members and 1 Guest are viewing this topic.

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Checking for existance of a dynamically created entity
« on: March 09, 2012, 05:13:18 PM »

Probably and obvious one, but how can I query the engine to test is a dynamically created entity is still valid/active, the scenario is that I have a method running which wants to carry even though I have left the scene, and it try to issue a SkipTo directive to an entity which has been destroyed as the entity is created by the Scene object.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Checking for existance of a dynamically created entity
« Reply #1 on: March 11, 2012, 10:11:00 AM »

If you keep a reference to the entity in some variable, the variable will become 'null' when the entity is destroyed.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Checking for existance of a dynamically created entity
« Reply #2 on: March 11, 2012, 08:21:21 PM »

thanks, I thought that might work.
Logged
 

Page created in 0.038 seconds with 19 queries.