Hello, I am almost done with my game, but there are some unanswered questions on my mind.
1. I set sound effects to play when various things happen (power-up pick up, upon killing unit...)
I noticed that sound volume is different (same sound effects is played) when different things happen.
For example when I shoot enemy unit there are more sound effects played at the same time (gun shot, unit hit and when the unit is killed).
When the sound effect is played alone (picking power-up), it is played at higher volume (is louder).
I have no idea why is that because I have created the sound and set volume to it.
2. I have read the manual about randomize() function, watched some YT video explaining (how to use it, why, proof of using the same seed: same "random numbers"), but I am still unsure if I used it the right way.
I have more objects which rely on random numbers ( irandom_range() ), so as I was told I have called the randomize() function once, in the create event.
The question is, do I have to call it for every object which "generate random numbers" ?
I tried to call it only once in the game start event (as i was told) but right afterwards i have noticed that my object generate the same numbers over and over. (putting the randomize() in create event fixed it, it does not generate the same numbers anymore).
Strange thing I have noticed is that I set 10% chance for something to happen (1 number in 10 does it) and I have seen some cases when it happened 4 times in a row (thats 0,01% if i am right).
1. I set sound effects to play when various things happen (power-up pick up, upon killing unit...)
I noticed that sound volume is different (same sound effects is played) when different things happen.
For example when I shoot enemy unit there are more sound effects played at the same time (gun shot, unit hit and when the unit is killed).
When the sound effect is played alone (picking power-up), it is played at higher volume (is louder).
I have no idea why is that because I have created the sound and set volume to it.
2. I have read the manual about randomize() function, watched some YT video explaining (how to use it, why, proof of using the same seed: same "random numbers"), but I am still unsure if I used it the right way.
I have more objects which rely on random numbers ( irandom_range() ), so as I was told I have called the randomize() function once, in the create event.
The question is, do I have to call it for every object which "generate random numbers" ?
I tried to call it only once in the game start event (as i was told) but right afterwards i have noticed that my object generate the same numbers over and over. (putting the randomize() in create event fixed it, it does not generate the same numbers anymore).
Strange thing I have noticed is that I set 10% chance for something to happen (1 number in 10 does it) and I have seen some cases when it happened 4 times in a row (thats 0,01% if i am right).