[Trigger] can this leak?

Status
Not open for further replies.
Level 5
Joined
Nov 25, 2004
Messages
65
i have trigger that look like this:

trigger1
event:map initialization
action:Set lightning_bzz = bfg_fire <gen>

trigger2
event:time - every 1 second of game time
action: Sound - Play lightning_bzz at 100.00% volume, attached to (Last created unit)

is there any leak with my trigger?
 
well.... i dont see any, at least. but im not very good at detecting leaks.
edit: why not just make it
every 1 second of game time
play bfg_fire <gen> at 100.00% volume, attached to last created uni?

why store the sound in a variable first?
 
well.... i dont see any, at least. but im not very good at detecting leaks.
edit: why not just make it
every 1 second of game time
play bfg_fire <gen> at 100.00% volume, attached to last created uni?

why store the sound in a variable first?

well i thought the trigger will not cause leak if i use variable.
 
Also playing a sound every second is highly imperformant rather go for a soundloop ( dont know if this possible but dont all sounds have a loop argument) so u can go for something like if sound finished then play sound (if its possible =d)
 
Status
Not open for further replies.
Back
Top