flysouth Posted July 22, 2016 Share Posted July 22, 2016 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? Quote Link to comment Share on other sites More sharing options...
Johxz Posted July 22, 2016 Share Posted July 22, 2016 Hi,I'm not a home XD so not sure... maybe something like this... if(isObject(%this.MyWindow)) { %this.MyDecal.delete(); } Quote Link to comment Share on other sites More sharing options...
flysouth Posted July 22, 2016 Author Share Posted July 22, 2016 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? Quote Link to comment Share on other sites More sharing options...
Duion Posted July 23, 2016 Share Posted July 23, 2016 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. Quote Link to comment Share on other sites More sharing options...
Bloodknight Posted July 23, 2016 Share Posted July 23, 2016 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. Quote Link to comment Share on other sites More sharing options...
flysouth Posted July 25, 2016 Author Share Posted July 25, 2016 @DuionHow do you deactivate decals for objects that can be destroyed? Quote Link to comment Share on other sites More sharing options...
Duion Posted July 25, 2016 Share Posted July 25, 2016 You can deactivate decals per material and per object instance in the scene editor, set "decal type" to none. Quote Link to comment Share on other sites More sharing options...
flysouth Posted July 25, 2016 Author Share Posted July 25, 2016 Thank you that is just what I want :) Quote Link to comment Share on other sites More sharing options...
flysouth Posted July 27, 2016 Author Share Posted July 27, 2016 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 Quote Link to comment Share on other sites More sharing options...
rlranft Posted July 27, 2016 Share Posted July 27, 2016 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/TorqueRef/content/documentation/Scripting/Advanced/RTSPrototype.html#Spawning_the_Marker Quote Link to comment Share on other sites More sharing options...
Duion Posted July 27, 2016 Share Posted July 27, 2016 @flysouthIn that case you are left with the possibility to deactivate decals on the material the object uses, this works all the time. Quote Link to comment Share on other sites More sharing options...
flysouth Posted July 27, 2016 Author Share Posted July 27, 2016 How would I do that? Quote Link to comment Share on other sites More sharing options...
Duion Posted July 28, 2016 Share Posted July 28, 2016 Oh I forgot, you cannot change that in materials, I confused it with the footprint decals, sorry my mistake. Quote Link to comment Share on other sites More sharing options...
flysouth Posted July 28, 2016 Author Share Posted July 28, 2016 Okay after looking in the code I see this is yet another thing that needs C++ code changes to achieve. :cry: Only TSStatic apears to have a decalType property that allows the decals to be turned off.The decal system itself is pretty lame. It does not make public any method of finding decals without an ID. The Decalmanager C++ code does contain a getClosestDecal function but it cannot be used by TS. The more I try to use T3D the more I realize that in its current form even the most basic things require code changes :roll: I am sure glad I did not have to pay for it or by now I would be pretty p'd @ff Quote Link to comment Share on other sites More sharing options...
Duion Posted July 28, 2016 Share Posted July 28, 2016 Look at that thread, somebody recently worked on a solution, so you may want to test if it works: http://forums.torque3d.org/viewtopic.php?f=23&p=6173#p6173 Quote Link to comment Share on other sites More sharing options...
rlranft Posted July 28, 2016 Share Posted July 28, 2016 I'm just gonna chime in here and say that when the engine was written people were happy just to have decals working - most didn't bother doing anything besides let the decals fade (like T3D does). Old code is old, bro. Quote Link to comment Share on other sites More sharing options...
flysouth Posted July 28, 2016 Author Share Posted July 28, 2016 I'm just gonna chime in here and say that when the engine was written people were happy just to have decals working - most didn't bother doing anything besides let the decals fade (like T3D does). Old code is old, bro.Yes floppy disk were also great back then, but things have changed :lol: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.