[Need Help] - Emitter Not Saving Correctly?
by Nicolai Dutka · in Torque 3D Beginner · 03/17/2010 (3:09 pm) · 2 replies
I've got 12 weapons in my game. I started with just one and got it 100% setup for all of my game specific mechanics (robust state machine with emitters, animations, even manual state changes). I then made 11 copies, each in their own .cs file, and renamed them all to unique names. All 12 weapons are working perfectly, each one with their own unique "behaviors" and "game mechanics".
I started modifying the stateEmitters on each of the weapons and got 10 of them done. The 11th one refuses to save!
I tried opening the .cs file for this 11th weapon and modifying the emitter manually, but even after saving the file and loading the game, all my changes get reverted...
I left the .cs file for the weapon open and went into the particle editor in the game. I used the particle editor to modify the emitter and hit the save button. I clicked on my .cs file and it gave me an error:
This file has been saved by another program, load changes into the editor?
(Something like that)...
I choose yes and I see all the new values matching the values I set in the particle editor in the game. I then close the game and re-open.... POOF, my changes are gone again! I click back on my .cs file and get that error once again and when I load the changes, sure enough, everything was reverted back to when I first started....
WTF???!!
Why would I be able to edit 10 in a row with no problems and suddenly have issues with this one? No errors in console, nothing at all to go on, it just keeps reverting my changes no matter how I do it... It's like it's loading the information from a cache file somewhere....
Please help me so I don't pull my hair out! :P
I started modifying the stateEmitters on each of the weapons and got 10 of them done. The 11th one refuses to save!
I tried opening the .cs file for this 11th weapon and modifying the emitter manually, but even after saving the file and loading the game, all my changes get reverted...
I left the .cs file for the weapon open and went into the particle editor in the game. I used the particle editor to modify the emitter and hit the save button. I clicked on my .cs file and it gave me an error:
This file has been saved by another program, load changes into the editor?
(Something like that)...
I choose yes and I see all the new values matching the values I set in the particle editor in the game. I then close the game and re-open.... POOF, my changes are gone again! I click back on my .cs file and get that error once again and when I load the changes, sure enough, everything was reverted back to when I first started....
WTF???!!
Why would I be able to edit 10 in a row with no problems and suddenly have issues with this one? No errors in console, nothing at all to go on, it just keeps reverting my changes no matter how I do it... It's like it's loading the information from a cache file somewhere....
Please help me so I don't pull my hair out! :P
#2
Something happened with me having the weapon's .cs file open while using the in-game particle editor that caused the emitter datablock to get saved to the same file twice! I was editing the first one in the file not knowing there was a second one there. The engine reads in the one I was editing, but then overwrites it with the next one it finds cuz it has the same name. Strange since every other object creation method in the game will give me an error about re-declaring a datablock...
Anyway, I removed the second datablock and I'm good to go.
Hope this helps someone else out there!
03/17/2010 (3:31 pm)
OMFG I found it!!Something happened with me having the weapon's .cs file open while using the in-game particle editor that caused the emitter datablock to get saved to the same file twice! I was editing the first one in the file not knowing there was a second one there. The engine reads in the one I was editing, but then overwrites it with the next one it finds cuz it has the same name. Strange since every other object creation method in the game will give me an error about re-declaring a datablock...
Anyway, I removed the second datablock and I'm good to go.
Hope this helps someone else out there!
Torque 3D Owner Nicolai Dutka
I also tried using the DTS file from the working one with no change at all.
I can't think of any reason at all that this would be happening except that maybe there is a bug with the particle editor that's causing it...
I'll try saving out the emitter under a different name...