Cortex-Command-Community-Project icon indicating copy to clipboard operation
Cortex-Command-Community-Project copied to clipboard

Changing Min/MaxVelocity of Emissions gets reset every frame

Open comradeshook opened this issue 1 year ago • 2 comments

Describe the bug When you use a for-loop iterator to change Min/Max velocity of an AEmitter's emissions, the change appears to be reset every frame and does not affect the velocity of the emitted particles. I have not tested this for other emission properties yet.

To Reproduce Define any emitter with at least one Emission, and try using Lua to change the velocities of the emissions. The change does not persist.

Expected behavior Changes to Min/MaxVelocity should be persistent.

Screenshots image This code only prints the initially defined MinVelocity of the emitter, or 0 if undefined. Placing the print after the change displays the correct value, but it is reset before emission.

emitterbug.zip

comradeshook avatar Feb 05 '24 17:02 comradeshook

Please add a test script for this. There's a lot of prerequisite setup I'd need to do to be able to test this reliably

Causeless avatar Feb 09 '24 14:02 Causeless

Ah right, forgot about that; here's a mod for repro. Just spawn the bomb from the 00emitterbug group and observe as the emission doesn't change velocity despite being randomised every frame. emitterbug.zip

comradeshook avatar Feb 11 '24 11:02 comradeshook