Game Development Community

TGB sprites duplicate themselves in the editor - RESOLVED

by Shaolin Dave · in Torque Game Builder · 06/06/2011 (12:19 am) · 3 replies

So, I create a new ImageMap for my player character, with 40 images. I create seven animations from that imagemap. Next, I create my player object by dragging him to the window and typing in all his appropriate scripting and dynamic fields info.

I save what I have of my game so far and reopen it.

Now, I have two identical imagemaps with 40 images each. My seven animations are now fourteen, two of each.

I try to delete the extras, but I get a warning that states "There are 15 objects referencing this material. If the material is deleted, the objects will also be deleted." I know for a fact there is only one object referencing the material, as my game only has one object so far. This object seems to be referencing both materials as it doesn't matter which one I delete.

I was a couple weeks into my previous project and managed to loose pretty much everything trying to fix this, and now it's happening again. I've checked the datablocks.cs file, it only references the imagemap once. I've checked the images folder, it only has one copy of the image.

#1
06/06/2011 (2:37 am)
Start your game, open console and try to delete one of your datablocks twice. If there is only one instance you will get "unable to find object" message on the second time - in that case it is a builder glitch and, since it doesn't really affects your game, you can pretty much just ignore it. Have no idea what may cause or how to fix this, to be honest.

Also your datablocks file can probably be loaded twice, or imagemap datablock is duplicated somewhere else - builder then has nothing to do with it, it's solely depends on what and where is in your scripts.
#2
06/06/2011 (8:25 pm)
It's definitely a builder glitch. It doesn't affect the game, but it really, REALLY messes up my organization while creating the game.

Since I posted this yeterday, the problem seemed to fix itself. However, after working on the project for a while (adding a tileset and 3 new animations) it did it again. Then I closed and reopened the builder and it tripled everything!

Now, I'm not entirely sure what's causing it, but as of the past couple minutes it seems to double all my assets when I load the project by picking project.t2proj out of the finder. If I open TGB by itself and let it select the last project, it'll list my assets properly. If I choose [i]open project[i] from the file menu in TGB, it seems to be okay too.

Yesterday I could have sworn auto-openning resulted in the glitch, but I could be wrong.
#3
12/12/2011 (10:00 am)
Fixed, in 1.7.6