Hi There. I'm new to this (done the first tutorial) and using drag and drop.
A little background:
I'm testing Gamemaker with the view to buying GM HTML5 in order to make e-cards. I usually use Flash to do this but with the current move away from that technology I'm looking to find a way to make my cards in HTML5.
My test project is to replicate this card in game maker.
So far I have the animation loaded in as a sprite and created a dragon object.
My events are:
Create - change the sprite to sub image to 0 and hold (speed 0)
left pressed - sub image to 1 and play (speed 1)
Animation end - sub image to the last image of the sprite.
What I am trying to do is to play a sound when the button is pressed and the sprite hits the correct sub image.
I can't seem to find a way to do this with drag and drop. Any hints and tips as to how I could do this would be gratefully received.
Synchronising sound and animation.
Started by squeakydave, Feb 24 2012 11:30 AM
2 replies to this topic
#1
Posted 24 February 2012 - 11:30 AM
#2
Posted 24 February 2012 - 01:12 PM
I haven't used DnD in a very long time but this should be what you want:
Create a step event in the dragon object, in the control section of actions at the bottom you'll see this icon:
variable: image_index
value: (The sub img numb)
operation: equal to
You should know what to do here.
Repeat the process with every sub img that should have a sound
Create a step event in the dragon object, in the control section of actions at the bottom you'll see this icon:
variable: image_index
value: (The sub img numb)
operation: equal to
You should know what to do here.
Repeat the process with every sub img that should have a sound
#3
Posted 24 February 2012 - 01:50 PM
Many thanks for that. It works like a charm. It also gives me a great pointer for further exploration.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











