Page 1 of 2

Soundquestion

PostPosted: Wed Mar 26, 2008 11:28 am
by wsc24
Hello people (and especially the sound experts),
Anybody knows a way, as I have a player the sound of walking affix?

Thank you ever

wsc24

:)

Re: Soundquestion

PostPosted: Wed Mar 26, 2008 12:09 pm
by stevenp
i dont understand :?

Re: Soundquestion

PostPosted: Wed Mar 26, 2008 1:08 pm
by wsc24
mojo domo wrote:i dont understand :?


Hi Mojo,
Probably the bane of Google.
Since I am not good English can be, I use Google to translate. I try again.

An Actor goes with the arrow keys control to the right or left or, if no button pressed hi stopped.
Whenever he goes, the sound of his steps be heard .... Tap, tap, tap.
Wsc24

Re: Soundquestion

PostPosted: Wed Mar 26, 2008 6:41 pm
by Kalladdolf
oh, so do you want a sound effect for footsteps, or the script how to make the sound only play when you walk?

also, willst du einen sound effect oder wissen, wie man den in GE einbaut? Also einen script?

Re: Soundquestion

PostPosted: Thu Mar 27, 2008 7:50 am
by wsc24
==Kalladdolf== wrote:oh, so do you want a sound effect for footsteps, or the script how to make the sound only play when you walk?

also, willst du einen sound effect oder wissen, wie man den in GE einbaut? Also einen script?


If it is easy to make is just a tip
If it is complicated, I prefer a Tut, so I know a background.
If it does not, there would be a Tut script is the best solution
Thank you
Wsc24

Wenn es einfach zu machen ist eigentlich nur einen Tip
Wenn es komplizierter ist wäre mir ein Tut am liebsten, damit ich die Hintergründe kennenlerne.
Wenn es kein Tut gibt wäre ein script die beste Lösung
vielen Dank
wsc24

For this translation was the familiar Google tool.

Re: Soundquestion

PostPosted: Thu Mar 27, 2008 8:36 am
by Kalladdolf
basically if you want your player to go tap-tap, just make him play the "tap" sound when he's reached a certain frame of his walking animation.
for example:
your walking animation has 5 frames.
at the 3rd frame it looks like your player touches the floor with 1 foot.
example:
tap.jpg


at this frame you want him to play the tap sound.
the code would be:
Code: Select all
if(animpos ==2) //animpos counts from 0
{//play the sound}


this goes only for the walking animation.

Re: Soundquestion

PostPosted: Thu Mar 27, 2008 9:31 am
by wsc24
Vielen Dank Kall,
manche Dinge sind sehr einfach wenn mann weiß wie es geht

wsc24

For translating use Google

Re: Soundquestion

PostPosted: Thu Mar 27, 2008 9:43 pm
by Game A Gogo
Code: Select all
if(animindex==1 && animpos==2)//animindex being animation
{
    playsound("footstep1.wav",1,1,1);
}

something like that would prevent if another animation has some frames also

Re: Soundquestion

PostPosted: Fri Mar 28, 2008 8:41 am
by wsc24
Thank Game A Gogo,

We are also rewarded with a point.

Thank you

8)

wsc24

Re: Soundquestion

PostPosted: Fri Mar 28, 2008 7:37 pm
by Freddy
You can also do...
colison (anyside of ground, do not repeat while colliding) -> play sound "tap"
:D

Re: Soundquestion

PostPosted: Fri Mar 28, 2008 10:00 pm
by Game A Gogo
when he would be standing, it would repeat it uselessly. and it would play it more then once

Re: Soundquestion

PostPosted: Sat Mar 29, 2008 12:34 am
by Freddy
Game A Gogo wrote:when he would be standing, it would repeat it uselessly. and it would play it more then once

No, because the reapeat while colliding is turned off.

Re: Soundquestion

PostPosted: Sat Mar 29, 2008 4:55 am
by Game A Gogo
and this is were my theory comes in :3
Since x and y are floating point values and not integer, they can go between pixels (like .5, but they are rounded up) so their value can be changed without any visual change.
And then, you add gravity to your character. like lets say yvelocity+=.4 :3 that wouldn't be enough to cause visual change. but it would still be moving up and down between the pixels on the platform, the collision check will do it before the output data is rounded up, so it will check with the floating values, so making it collide on and off without you seeing :3 just because the yvelocity will keep trying to move lower.

Re: Soundquestion

PostPosted: Sun Mar 30, 2008 8:02 pm
by speckford123
Game A Gogo wrote:and this is were my theory comes in :3
Since x and y are floating point values and not integer, they can go between pixels (like .5, but they are rounded up) so their value can be changed without any visual change.
And then, you add gravity to your character. like lets say yvelocity+=.4 :3 that wouldn't be enough to cause visual change. but it would still be moving up and down between the pixels on the platform, the collision check will do it before the output data is rounded up, so it will check with the floating values, so making it collide on and off without you seeing :3 just because the yvelocity will keep trying to move lower.



i think sortof an example of this is my demos using the canvas where you see the characters shake a bit from the gravity, mainly because the canvas isnt designed to prevent this and just draws them rounded up or down :P

well, i could just add a code to fix this...........you've gave me a alot to think about :lol:

Re: Soundquestion

PostPosted: Sun Mar 30, 2008 8:12 pm
by Game A Gogo
yes yes, perhaps using something like
Code: Select all
draw_from("something",(int)player.x,(int)player.y,1);


since (int) will make the var super round down (it just erases the decimals)