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: Adding entities or graphics  (Read 2553 times)

0 Members and 1 Guest are viewing this topic.

theflash

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 34
    • View Profile
Adding entities or graphics
« on: December 03, 2009, 02:56:31 PM »

Hello,

i have created a checkboard type field with 144 squares and thus 144 entities. Now I need to display icons over some of these squares.
Do I have to create another 144 entities and use active=true/false and setSprite to achieve that, or is there a way to "dynamically" create new entities (by script) or maybe insert graphics relative to the position of the original 144 entities?

Thank you for your help!
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Adding entities or graphics
« Reply #1 on: December 03, 2009, 05:20:18 PM »

Yes, you can create entities dynamically using Scene.CreateEntity() method.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

theflash

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 34
    • View Profile
Re: Adding entities or graphics
« Reply #2 on: December 03, 2009, 05:36:00 PM »

Yeah, sure, it had to be that easy. Couldn't be that it was just really complicated to do, no, it had to be that I didn't check the reference for 'Scene'...

Thank You!
Logged
 

Page created in 0.039 seconds with 24 queries.