### How to destroy decal

There are no stupid questions, just stupid answers.
• 1
• 2

#### How to destroy decal

flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
I made some windows that when shot break. The problem is that the default bullet decals stay floating in the air even though the window has been destroyed. Is there a way to prevent the decals from being placed on a specific object? Or perhaps being removed somehow?

#### Re: How to destroy decal

Johxz
Posts: 411
Joined: Sat Feb 07, 2015 11:37 pm
Hi,

I'm not a home XD so not sure... maybe something like this...

if(isObject(%this.MyWindow)) {       %this.MyDecal.delete(); }

#### Re: How to destroy decal

flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
Thanks for the suggestion. Unfortunatly it seems to suggest that I would know the name of the decal. It was put there by a bullet not by my script. Is there a way to search for it?
Do decals become a 'child' of the surface they are on?

#### Re: How to destroy decal

Duion
Posts: 833
Joined: Sun Feb 08, 2015 1:51 am

I have a similar problem and could not find a solution so far as well other than deactivating decals for objects that can be destroyed.
Decals are just objects with a coordinate in the world I think, the same way you place props in the world, you place them and they are there, minus the object inspector features.

#### Re: How to destroy decal

Bloodknight
Posts: 94
Joined: Tue Feb 03, 2015 8:58 pm
I think the best solution might be to identify the material as one that doesn't use decals at all, while I don't know if it is in the engine or not (I don't use weapons) there is a resource somewhere that implements different decals on different materials, this should include a method to prohibit decals.

#### Re: How to destroy decal

flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
@
Duion

How do you deactivate decals for objects that can be destroyed?

#### Re: How to destroy decal

Duion
Posts: 833
Joined: Sun Feb 08, 2015 1:51 am

You can deactivate decals per material and per object instance in the scene editor, set "decal type" to none.

#### Re: How to destroy decal

flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
Thank you that is just what I want

#### Re: How to destroy decal

flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
Maybe a stupid question but... this is a scripted object and the option is not available in the scene editor. I have tried setting it in the datablock but does nothing

#### Re: How to destroy decal

rlranft
Posts: 298
Joined: Thu Feb 05, 2015 3:11 pm

On the client functions exist for adding/removing decals, but you have to have the decal's id:
decalManagerRemoveDecal(%unit.decal);decalManagerAddDecal(%position, %norm, 0, 1, "destDecal", true);

http://www.roostertailgames.com/TorqueR ... the_Marker
• 1
• 2

#### Who is online

Users browsing this forum: No registered users and 1 guest