A
Anomaly
Guest
Hi guys,
I've been decorating my levels with weather made by particles.. snow rain etc..
I have a script "Weather" that gets executed in an object's create event, at the beginning of the room creation.
in the script "Weather" that's called... is a switch / case flow with particle creations in each case.
After the script creates the emitter, I need to destroy the emitter like I've needed to do in other particle setups, so it doesn't remake itself it each step, right?
When using the emitters in an object, I'd just use the destroy event, but scripts don't have that option.
I put the destroy code in the bottom of the weather emitter script but i think it destroys them faster then it had time to make any particles.
Maybe I'm not calling their specific location properly?
should it be like..
???
ALSO...
in this situation, since they're only initialized by the script once at room creation, ...
Do i NEED to destroy them?
I had them destroyed at "room end" and that stopped them from persisting in other rooms, but i don't know if it's good enough, I just don't want my particle load to crowd up while that room is played...and my memory, crash the game etc... I've had that happen a lot before using the destroy code.
Any tips?
THANKS!!
I've been decorating my levels with weather made by particles.. snow rain etc..
I have a script "Weather" that gets executed in an object's create event, at the beginning of the room creation.
in the script "Weather" that's called... is a switch / case flow with particle creations in each case.
After the script creates the emitter, I need to destroy the emitter like I've needed to do in other particle setups, so it doesn't remake itself it each step, right?
When using the emitters in an object, I'd just use the destroy event, but scripts don't have that option.
I put the destroy code in the bottom of the weather emitter script but i think it destroys them faster then it had time to make any particles.
Maybe I'm not calling their specific location properly?
Code:
// DESTROY EMITTERS
part_system_destroy(snow);
part_system_destroy(rain);
part_system_destroy(flare);
part_system_destroy(cloud);
Code:
something_else.part_system_destroy(snow);
ALSO...
in this situation, since they're only initialized by the script once at room creation, ...
Do i NEED to destroy them?
I had them destroyed at "room end" and that stopped them from persisting in other rooms, but i don't know if it's good enough, I just don't want my particle load to crowd up while that room is played...and my memory, crash the game etc... I've had that happen a lot before using the destroy code.
Any tips?
THANKS!!