Puma Posted May 10, 2012 Share Posted May 10, 2012 Hai, I'm doing a movement editor for the map-editor. It uses the objects of the map itself and, if needed, creates a few extra objects as copies. The problem is, when I go into testmode and I test the map, restart the EDF-resource so the script is restarted and activate the testmode, it moves the objects out of place and creates a few new objects. When I go back into the editor again (out of testmode), the objects are fucked up. Some objects are misplaced, others are missing (this obviously happens to the objects that are affected by my script). What I already tried: when the resource is running in the editor (in testmode of the map) and you use a certain command that starts the testmode of the resource (so you can see how the objects are going to move), it puts every object in a table accompanied by its data (getAllElementData). All objects that are created by my script, are also put in a table. When you use the command that stops the testmode of my resource, it loops through the script-generated objects, destroys them, and then loops through the table of objects that already were present and made by the editor: it checks if they still exist and if not, it creates new ones using the same data (model ID, position etcetera). That works, but when I enter the editor-mode, some objects are missing, duplicated or misplaced. What is the best way to do this, so the original objects and their positions etcetera are properly restored when you go into editor-mode? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now