VisibilityLevel problems
by Vishal Bhanderi · in Torque X 2D · 10/24/2008 (12:44 pm) · 2 replies
Hi guys,
I'm trying change the object's visibility level, but everytime I change it, it just resets itself. I'm trying to make the platformer kit's actor flash when he get's hit. I can't even get it to work with the starter code (the GG logo).
Any idea's ?
Thanks
Vishal
I'm trying change the object's visibility level, but everytime I change it, it just resets itself. I'm trying to make the platformer kit's actor flash when he get's hit. I can't even get it to work with the starter code (the GG logo).
Any idea's ?
Thanks
Vishal
About the author
#2
I still don't see the changes. I've also tried calling this fragment of code when I want to change the visibility:
But this still doesn't seem to work. Any other idea's?
Also when modifying the xml sceneData manually and then using TXB's save. It overwrites anything you manually added. Is there a way to stop it doing this?
10/26/2008 (3:24 am)
Thanks Zilla. I managed to get the VisibiltyLevel working on the GG logo, but not yet on the platformer. Even though I mark the textures like:<SimpleMaterial name="jumpMaterial" type="GarageGames.Torque.Materials.SimpleMaterial"> <TextureFilename>data/images/dragon/jump.png</TextureFilename> <IsTranslucent>true</IsTranslucent> <IsColorBlended>true</IsColorBlended>
I still don't see the changes. I've also tried calling this fragment of code when I want to change the visibility:
T2DAnimatedSprite animatedSprite = AnimatedSprite; SimpleMaterial _renderMaterial = animatedSprite.AnimationData.Material as SimpleMaterial; _renderMaterial.IsTranslucent = true; _renderMaterial.IsColorBlended = true; AnimatedSprite.VisibilityLevel = 0.3f;
But this still doesn't seem to work. Any other idea's?
Also when modifying the xml sceneData manually and then using TXB's save. It overwrites anything you manually added. Is there a way to stop it doing this?
Torque Owner Zilla
www.garagegames.com/mg/forums/result.thread.php?qt=74517