How to destroy decal

There are no stupid questions, just stupid answers.
  • 1
  • 2
17 posts Page 1 of 2
flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
by flysouth » Fri Jul 22, 2016 4:52 pm
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?
Johxz
Posts: 404
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Fri Jul 22, 2016 8:15 pm
Hi,

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

if(isObject(%this.MyWindow)) { 
%this.MyDecal.delete();
}
flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
by flysouth » Sat Jul 23, 2016 12:19 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?
Duion
Posts: 755
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sat Jul 23, 2016 11:10 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.
Bloodknight
Posts: 89
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Sat Jul 23, 2016 2:54 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.
flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
by flysouth » Mon Jul 25, 2016 10:04 am
@
User avatar
Duion

How do you deactivate decals for objects that can be destroyed?
Duion
Posts: 755
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Jul 25, 2016 10:26 am
You can deactivate decals per material and per object instance in the scene editor, set "decal type" to none.
flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
by flysouth » Mon Jul 25, 2016 11:01 am
Thank you that is just what I want :)
flysouth
Posts: 105
Joined: Sun May 15, 2016 10:16 am
by flysouth » Wed Jul 27, 2016 5:14 pm
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
rlranft
Posts: 298
Joined: Thu Feb 05, 2015 3:11 pm
 
by rlranft » Wed Jul 27, 2016 6:47 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
17 posts Page 1 of 2

Who is online

Users browsing this forum: No registered users and 1 guest