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: RemoveAttachment on entities  (Read 2314 times)

0 Members and 1 Guest are viewing this topic.

Jose

  • Regular poster
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 134
    • View Profile
RemoveAttachment on entities
« on: November 25, 2011, 06:55:26 AM »

Hi all,

I've a problem with the RemoveAttachment method of an entity. I'm trying to use this method to remove a previous attached entity but the method always return false. Here is the code I use to attach one entity (lupa) to another entity (streetlights):

Code: [Select]
var ent = this.GetFreeNode("streetlights");
ent.AddAttachment("lupa.entity", false, -64, -243);

And here is the code I use to try to detach the entity previously attached (lupa) from the other entity (streetlights):

Code: [Select]
                ent.RemoveAttachment(0);

But I always get false as return of the method RemoveAttachment and the attached entity remains attached and visible (unless I set its Active property to false, then the entity remains attached but not visible).

Any ideas?

Thanks in advance!

Best,

Jose
Logged
 

Page created in 0.023 seconds with 23 queries.