two or more footsteps sound??

Started by Nahuel, Tue 18/05/2010 02:39:43

Previous topic - Next topic

Nahuel

Hello everyone!!! Is everybody OK?? I hope yew  := so... when my char walk on wood sound is equal to pavement. How can I put 2 sound on the footsteps in 1 room, in 2 o more walkable areas??

THANKS!!

Nahuel.
Life isn't a game. Let's develop a life-like-game.

Wonkyth

One way to do it would be to have regions identical to the walkable areas, and set it so that the sound is changed when they walk onto the other surface... am I making sense?
"But with a ninja on your face, you live longer!"

Nahuel

Quote from: wonkyth on Tue 18/05/2010 05:00:17
One way to do it would be to have regions identical to the walkable areas, and set it so that the sound is changed when they walk onto the other surface... am I making sense?
Thanks wonkyth but how can I make this option??

Nahuel
Life isn't a game. Let's develop a life-like-game.

Dualnames

I'd use AnimationRunScript module for that. Check it out on the modules section. If you have trouble using it let us know. Hope that helps.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Nahuel

Quote from: Dualnames on Wed 19/05/2010 12:48:15
I'd use AnimationRunScript module for that. Check it out on the modules section. If you have trouble using it let us know. Hope that helps.

Thanks!!! But the page for download the module is not available  :'( 
http://www.dmgenie.com/ags/AnimationRunScript_1.zip

------------------------------------------------------------------------------------------------------------------------------------------
"Page Not Found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please try the following:

    * If you typed the page address in the Address bar, make sure that it is spelled correctly.
    * Click the Back button in your browser to try another link.
    * Use a search engine like Google to look for information on the Internet.
------------------------------------------------------------------------------------------------------------------------------------------

Does anyone have the module, AnimationRunScript ?

Thanks!!

Nahuel
Life isn't a game. Let's develop a life-like-game.

Dualnames

#5
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Nahuel

Quote from: Dualnames on Wed 19/05/2010 16:20:13
I do. Let me upload.

http://www.mediafire.com/?cmitjmmzmzl

Thank you very much Dualnames!!!!!

Now is time to read and (try to) learn heheheh  :=

Thanks!!!

Nahuel.
Life isn't a game. Let's develop a life-like-game.

Dualnames

Quote from: peillat.nahuel on Wed 19/05/2010 17:02:38
Quote from: Dualnames on Wed 19/05/2010 16:20:13
I do. Let me upload.

http://www.mediafire.com/?cmitjmmzmzl

Thank you very much Dualnames!!!!!

Now is time to read and (try to) learn heheheh  :=

Thanks!!!

Nahuel.

I'm using the module so if you need any help, please do say. :D
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Nahuel

Quote from: Dualnames on Wed 19/05/2010 17:53:36
I'm using the module so if you need any help, please do say. :D

Dualnames, I want to change the sound of footsteps on Sand. How should I delimit the territory when the player walks on Sand or Concrete? What function I have to use?

Thank you.
Sorry for the inconvenience.

Nahuel.
Life isn't a game. Let's develop a life-like-game.

Khris

I don't know the module and couldn't find it on the spot, but I'm pretty sure you'll have to either use different walkable areas or add regions.

Nahuel

#10
Quote from: Khris on Wed 19/05/2010 19:39:39
I don't know the module and couldn't find it on the spot, but I'm pretty sure you'll have to either use different walkable areas or add regions.

EXCELENT!!! My bad!! Regions, Regions!! I confuse Regions with Edges!!!

Thank you!!

Ok, so.... I delimited the region of new footstep sound, then use like this:



Code: ags

function region1_WalksOnto()
{
  ars_AddCharacter(cEgo, 3, 1, 8, 2);
    //For cEgo, in View 3, Loop 1, Frame 8, run script 2 ??
}


Code: ags

function ars_RunScript(int ScriptNum)
{
  if (ScriptNum == 1)
  {
    //This is an example script (it tints the character green)
    cEgo.Tint(0, 250, 0, 30, 100);
	}
  else if (ScriptNum == 2){

    PlaySound(1);
  }
}


Is this ok??

Thanks!

Nahuel


EDIT....


IT WORKS!!! but the sound doesn't change I will try to put the same code in diferent region or.... How can I stop the change, I mean, I want the change of sound ONLY in the REGION

I'll try region1_WalksOff()


???
Life isn't a game. Let's develop a life-like-game.

Dualnames

Here it is.

Code: ags

bool soundswap=false;

function game_start() {
ars_AddCharacter(cEgo, 3, 1, 8, 2);
// Yes that is correct on view 3 loop 1 and frame 8, script 2 will be executed.
//I set the frame i want the sound to be played.
}


function ars_RunScript(int ScriptNum){
if (ScriptNum == 1)  {
   //This is an example script (it tints the character green)
   cEgo.Tint(0, 250, 0, 30, 100)
}
else if (ScriptNum == 2){
  if (soundswap) PlaySound(1);
  if (!soundswap) PlaySound(2);
}

function region1_WalksOnto(){
soundswap=false;
}

function region2_WalksOnto(){
soundswap=true;
}

Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Nahuel

#12
Quote from: Dualnames on Wed 19/05/2010 21:49:51
Here it is.

Code: ags

bool soundswap=false;

function game_start() {
ars_AddCharacter(cEgo, 3, 1, 8, 2);
// Yes that is correct on view 3 loop 1 and frame 8, script 2 will be executed.
//I set the frame i want the sound to be played.
}


function ars_RunScript(int ScriptNum){
if (ScriptNum == 1)  {
   //This is an example script (it tints the character green)
   cEgo.Tint(0, 250, 0, 30, 100)
}
else if (ScriptNum == 2){
  if (soundswap) PlaySound(1);
  if (!soundswap) PlaySound(2);
}

function region1_WalksOnto(){
soundswap=false;
}

function region2_WalksOnto(){
soundswap=true;
}



WOW! This is GREAT!! I understand now!! I will make my modification on the code and that's it!!

Thanks Dualnames again and again!!!

And thanks you all guys!!

Nahuel.


EDIT!!!

Dualnames  where I should put the bool soundswap=false; variable??

function game_start()   - where?? In AnimationRunScript or GlobalScript_1?? -

Thank you!!


IT WORKS!!!

Thanks!!!
Life isn't a game. Let's develop a life-like-game.

SMF spam blocked by CleanTalk