Page MenuHomeFeedback Tracker

Starting a new scenario doesn't properly clean all the objects from the previous scenario when they have been added via scripts
New, WishlistPublic

Description

When working with the Nimitz initalization and deinitializatino functions for 3DEN, TeTeT noticed that if you clear(new) the scenario after you have been working on a scenario with the Nimitz the parts that make up the Nimitz weren't deleted.

The WIP version of the nimitz uses "init", "AttributesChanged3DEN", and "UnregisteredFromWorld3DEN" events to build, move and delete the various parts for the ship while working with 3DEN. These parts don't get registered as entites and do not appear in the mission.sqm.

When you place the Nimitz (or any other vehicle that creates vehicles in the init) in the 3DEN editor the init eventhandler is called and the parts are created using createVehicle. We then attach the 3DEN specific eventhandlers to handle the movement and removal of the root object to reflect onto the constituent parts. This is all working as expected.

After you have worked on a scenario with the Nimitz and want to start working on a new one if you click the button for a new scenario it removes all the objects except for the parts that were created using createVehicle as part of the root object Init eventhandler call.

Expected behaviour would be that the objects that were created by other objects init functions are also deleted from the scenario when a new one is created.

Details

Legacy ID
194189296
Severity
None
Resolution
Open
Reproducibility
Always
Category
Eden Editor
Steps To Reproduce
  1. Create a scenario that contains an object/vehicle that creates more objects in an init function (http://tetet.de/arma/arma3/nimitz/experimental/@Nimitz.7z can be used as such an object)
  2. Save the scenario
  3. Observe that the constituent parts aren't part of the mission.sqm
  4. While still in the original scenario with the object placed click new scenario
  5. Observe the parts that weren't present in the mission.sqm are still present in the new scenario
Additional Information

I suspect this is the case with any type of vehicle/object but it can be limited to a certain subset of objects (static structures for example).

I didn't have the chance to try this with loading another scenario but its possible the same problem exists there as well. Will edit the ticket when i get a chance to test it.

There are possible workarounds by using the "OnMissionNew" eventhandler to manually find the parts and deleting them.

Event Timeline

Leshrack edited Steps To Reproduce. (Show Details)Feb 8 2016, 10:54 AM
Leshrack edited Additional Information. (Show Details)
Leshrack set Category to Eden Editor.
Leshrack set Reproducibility to Always.
Leshrack set Severity to None.
Leshrack set Resolution to Open.
Leshrack set Legacy ID to 194189296.May 8 2016, 1:41 PM