Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Zelda Game Help - Walking sounds UNSOLVED  (Read 2058 times)

0 Members and 1 Guest are viewing this topic.
Zelda Game Help - Walking sounds UNSOLVED
« on: November 29, 2006, 01:25:37 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 51
Hi
I'm making a Zelda game. How do i make it when Link walks a sound plays of Link walking. I tryed playing the sound when you press the arrow keys, to make him move it didn't work. What am i doing wrong.
Thanks alot
~CJ~
 :)

PS: I'm using Game Maker 6
« Last Edit: February 27, 2007, 02:39:31 am by Jetsvaoe »
Logged
~CJ






Re: Zelda Game Help - Walking sounds
« Reply #1 on: November 29, 2006, 01:37:40 am »
  • =/
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2284
 Your problem is your making the sound restart everytime you press the key, so well the key is down, you'll never hear the song.

Code: [Select]
if keyboard_check(vk_down){
 //Walking
 //Check if the sound is playing
 if not sound_isplaying(sou_walking){
 //Then play the song
  sound_play(sou_walking)
 }
}
Logged

AnimalCollective

Re: Zelda Game Help - Walking sounds
« Reply #2 on: November 29, 2006, 02:04:36 am »
For my games, I place this in the step event:

Code: [Select]
//defines a dummy variable for image_index
imagenum = image_index;
//checks for the correct animation frame
if floor(imagenum) = stepimage then
 {
 //checks if sound playing
 if sound_isplaying(sound1) = 0 then
  {
   sound_play(sound1);
  }
 }
//checks for the correct animation frame
if floor(imagenum) = stepimage2 then
 {
 //checks if sound playing
 if sound_isplaying(sound2) != 0 then
 {
  sound_play(sound2);
 }
 }

imagenum is just a variable that takes of the object's image_index so that it isn't modified. stepimage is the frame number of your walk animation when your character is stepping with one foot, and stepimage2 is the character stepping with the other foot. Sound1 and sound2 are the different step sounds associated with the animations.
[Note] The only reason I round the image_index is because I have some irregular image_speeds :/

pier's method works perfectly fine too, but I prefer mine because it will only play the sounds when the character appears to be stepping.
Logged

Goodnight

Once and future Captain
Re: Zelda Game Help - Walking sounds
« Reply #3 on: November 30, 2006, 07:13:51 am »
  • With a Capital G
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 706
AnimalCollective's idea is basically what I did when suggesting code for somebody else's game.

However in the Beta demo of Two Swords (my fan game in stasis), there's an effect where footsteps are used in the Results screen. I found that timing them to certain frames of the sprites made them play too far apart and drawn-out. So I just used alarms to play them every couple frames. They're small sprites so nobody could really notice.
Logged
Re: Zelda Game Help - Walking sounds
« Reply #4 on: February 05, 2007, 02:13:52 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 51
Hi
I'm having a problem with piers code. It works when he walks but the sound is to fast or its too slow, i can't really tell, but it doesn't sound like the sound i loaded in the game.
Thanks
~CJ~
 :)
Logged
~CJ






Re: Zelda Game Help - Walking sounds
« Reply #5 on: February 05, 2007, 02:27:02 am »
  • =/
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2284
 Is it an mp3 sound?
Logged
Re: Zelda Game Help - Walking sounds
« Reply #6 on: February 05, 2007, 02:49:29 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 51
I'm not sure, it says WAVE Audio file.
Logged
~CJ






Re: Zelda Game Help - Walking sounds
« Reply #7 on: February 17, 2007, 03:49:57 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 51
STILL NEED HELP  ???
PLEASE
Logged
~CJ






Re: Zelda Game Help - Walking sounds UNSOLVED
« Reply #8 on: February 27, 2007, 02:40:05 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 51
STILL NEED HELP
Logged
~CJ






Re: Zelda Game Help - Walking sounds UNSOLVED
« Reply #9 on: February 27, 2007, 05:16:53 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 570
dont double post,and show us an example.
« Last Edit: February 27, 2007, 05:20:08 am by linkw204 »
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.209 seconds with 57 queries.