PDA

View Full Version : SetFXTextureReplacement with textureGroup=null bug - questions in forum.



JCitron
October 22nd, 2015, 09:40 PM
Hi Chris,

See the thread below and more specifically this post here regarding the problem as this has the steps and a sample to reproduce the bug. This might be something that has already been attacked in the upcoming SP1, but the questions still are there about it.

http://forums.auran.com/trainz/showthread.php?123659-SetFXTextureReplacement-with-textureGroup-null-bug



Thank you for your answers!
It would be very nice if you could post this in the Dev forum, please let us know what they say! :)

I have built an example asset that is just the box and the script is the texture replacement script extracted from the script library (STL Script Library) we are using for the train cars.
As earlier it works perfectly fine in TS2010 but have the same problem in TANE.
You can download the box here:
https://www.dropbox.com/s/9cvv2889x3...g_box.cdp?dl=0 (https://www.dropbox.com/s/9cvv2889x3vg8zb/tane_texture_replacement_bug_box.cdp?dl=0)

It is just a box with three textures, 1:Red, 2:Purple and 3:Green, the first one is the default texture and is found in the box asset, the other two is inside the texture group asset.
When a new box is placed in the world it will pick one texture at random and then all three textures might show up. Nothing strange since the first texture is the default one and the SetFXTextureReplacement-method is not involved when the default texture is chosen.

To see the bug:
1. Place one box in the world. (Which color it gets doesn't matter)
2. Open the properties panel.
3. Cycle through the textures by pressing the texture name.
4. Not that it won't change to the first, red texture, instead the last texture shown (3: green) will be kept.

Look at line 12 in the script, this is where it should change back to the default script, but it doesn't work in TANE.

WindWalkr
October 23rd, 2015, 02:27 AM
I believe that this has already been addressed by this group. You'd have to test it in a current build to be sure.

chris

JCitron
October 23rd, 2015, 11:42 AM
Hi Chris,

It's still an issue in Test Build 78954. The cube skips over the red or color no. 1

I just noticed you setup another test build. I'm downloading that now and will test there as well.

Thanks,

John

WindWalkr
October 25th, 2015, 07:33 PM
Thanks. Please recheck this in the next build.

chris

JCitron
October 26th, 2015, 11:37 AM
Hi Chris,

I gave this a test in test build 79091. The problem still exists.

The assets will not display the red texture at all. It starts with green (#3), goes to purple (#2), then goes to red (#1) sometimes but not always display red - I got it to do that twice in my test.

The properties will also display the wrong name - I had that twice now. The dialog box shows red, but displays only green, but purple works fine and green displays green when green is listed.

I hope I explained this right...

Thanks

John

WindWalkr
October 26th, 2015, 12:17 PM
As above, please test in the next build.

kind regards,

chris

JCitron
October 26th, 2015, 01:00 PM
As above, please test in the next build.

kind regards,

chris

You mean the one that's not out yet? :D

John

JCitron
October 28th, 2015, 02:57 PM
Chris,

The team has fixed the problem with Build 79135

"Texture: The RED box says 1, The PURPLE box says 2, and The GREEN box says 3" just like it's supposed to.

Thanks,

John