Jump to content


Niku

Member Since 20 Aug 2007
Offline Last Active Jan 03 2012 03:31 AM

Topics I've Started

Animation end event for GM 7?

03 January 2012 - 12:07 AM

Hi :)
I read about the "Animation end" event, but don't see it in my version.
I'm still running Game Maker 7.
It sounds perfect for what I need though.
All I want to do is make my sprite play once and stop on the last frame.
Just on the creation event, nothing fancy.
Isn't there a way to do that?
Currently I'm working around it with nested alarms.
Each alarm changes the sprite index, and the last one zeroes the speed.
Works ok for short animations, but will be a pain for longer animations.
Any way, thanks in advance!

Prevent sound overlap during random play

03 July 2010 - 02:00 AM

I was using sound_play(choose(... but it only allows for 16 sounds and I have many more.
Someone helped me with this code which works great:
switch (floor(random(2))) {
case 0: sound_play(sound1); break;
case 1: sound_play(sound2); break;
case 2: sound_play(sound3); break;
//etc...
}
But I need the sounds to play one at a time immediately after each other (gapless), and not overlap each other.
Is there some way to do this?
Thank you in advance :)

Ease in, ease out

02 July 2010 - 04:03 PM

Thanks to previous tips, this code has been working great for me:
if image_xscale<1
{
image_xscale+=0.05
image_yscale=image_xscale
}
It's set up with alarms so it repeats until desired size is reached.
I've also been combining that scaling with a change to the view_yview variable (also set up with alarms) in order to center the sprite on the screen as it grows.
This works, but it's a little snappy and abrupt.
Is there a way to have it ease into place, like have it gradually decrease the changes in both scale and yview value as it nears the end of the transition?
Also, if there is another way to do this like some kind of camera zoom and pan, that would be great, but I'm not sure if there are any room or camera controls for view zooming or increasing screen size.
Thanks in advance for any insight :)

Tween scale

30 June 2010 - 04:24 PM

I like the sprite scale action, but would really prefer to see the effect be executed as a tween from 100% to 25%. Is that possible?

Playing A Random Sound With Choose

28 November 2007 - 04:47 AM

I'm using this code:
sound_play(choose(sound1,sound2,sound3,sound4,sound5,sound6,soun
d7,sound8,sound9,sound10,sound11,sound12,sound13,so
und14,sound15,sound16,sound17,sound18,sound19,sound
20,sound21,sound22,sound23,sound24,sound25))
But it only works when knock it back to 16 sounds instead of 25 is there a way to get all 25 sounds in there? Thanks