HOW TO GIVE A SINGLE TILE A SOUND EFFECT WHEN HERO STEPS ON IT

Posts

Pages: 1
Coonie
We do not allow ban evading.
0
So in rpg maker vx ace iam giving so when my hero steps in shallow water it plays a
sound but how would you do that?
pianotm
The TM is for Totally Magical.
32388
Oops. You meant for a whole chip. Sorry. The answer I gave is not the correct one.
NeverSilent
Got any Dexreth amulets?
6299
If you want the sound to play every time the player steps on one of the tiles in question, do the following:

1. Assign a Terrain Tag number to the tile (in the tilesets section of the database)
2. Set up five variables: One each for the player's current X and Y position on the map (these are options for the Control Variables event command), two for their previous position, and one for the player's current Terrain Tag.
3. Set up a parallel process event (either on the map or in a common event if you want to use this mechanic all the time). This event must constantly check the player's current position by storing their X and Y coordinates as variables. Then set up conditional branches that check whether the current X and Y position are not equal to the previous ones (stored in the other two variables). If either of these is the case, it means the player has moved.
5. Inside these conditional branches - so if the player has indeed moved - check the player's current Terrain Tag by storing it in a variable, and then check through a conditional branch if the number of the player's current Terrain Tag is equal to the number you gave the tile.
6. If that condition is fulfilled - which means that the player has just stepped onto the designated tile - have the sound effect play.
7. At the end of the event command list, set the "old X coordinate" variable to be equal to the "current X coordinate"'s value. Do the same thing for the Y coordinate, then add a 1 frame wait.

This event should now loop infinitely in the background and play the sound effect every time the player steps onto the tile you chose.
Coonie
We do not allow ban evading.
0
author=NeverSilent
If you want the sound to play every time the player steps on one of the tiles in question, do the following:

1. Assign a Terrain Tag number to the tile (in the tilesets section of the database)
2. Set up five variables: One each for the player's current X and Y position on the map (these are options for the Control Variables event command), two for their previous position, and one for the player's current Terrain Tag.
3. Set up a parallel process event (either on the map or in a common event if you want to use this mechanic all the time). This event must constantly check the player's current position by storing their X and Y coordinates as variables. Then set up conditional branches that check whether the current X and Y position are not equal to the previous ones (stored in the other two variables). If either of these is the case, it means the player has moved.
5. Inside these conditional branches - so if the player has indeed moved - check the player's current Terrain Tag by storing it in a variable, and then check through a conditional branch if the number of the player's current Terrain Tag is equal to the number you gave the tile.
6. If that condition is fulfilled - which means that the player has just stepped onto the designated tile - have the sound effect play.
7. At the end of the event command list, set the "old X coordinate" variable to be equal to the "current X coordinate"'s value. Do the same thing for the Y coordinate, then add a 1 frame wait.

This event should now loop infinitely in the background and play the sound effect every time the player steps onto the tile you chose.


is there a more simple way? or images pls
NeverSilent
Got any Dexreth amulets?
6299
If I knew a more simple way, I would have described that to you instead. But here you go, have some images:



This is what you do in the database. Just assign any number (in this example, number 1) to the tile you want to have the sound effect on (in this example, the one in the top left corner of the tileset).

Then do the following in your event. I used variables 1 to 5 for this, but you can obviously use different ones as long as you use them consistently. I strongly recommend playing around with variables a bit at some point, so you can learn what they can do. They're incredibly useful.



I hope this helps.
Coonie
We do not allow ban evading.
0
author=NeverSilent
If I knew a more simple way, I would have described that to you instead. But here you go, have some images:



This is what you do in the database. Just assign any number (in this example, number 1) to the tile you want to have the sound effect on (in this example, the one in the top left corner of the tileset).

Then do the following in your event. I used variables 1 to 5 for this, but you can obviously use different ones as long as you use them consistently. I strongly recommend playing around with variables a bit at some point, so you can learn what they can do. They're incredibly useful.



I hope this helps.


Could you please send me a project with only this event in it?
Coonie
We do not allow ban evading.
0
author=Coonie
author=NeverSilent
If I knew a more simple way, I would have described that to you instead. But here you go, have some images:



This is what you do in the database. Just assign any number (in this example, number 1) to the tile you want to have the sound effect on (in this example, the one in the top left corner of the tileset).

Then do the following in your event. I used variables 1 to 5 for this, but you can obviously use different ones as long as you use them consistently. I strongly recommend playing around with variables a bit at some point, so you can learn what they can do. They're incredibly useful.



I hope this helps.
Could you please send me a project with only this event in it?


like a link or something pls :D
NeverSilent
Got any Dexreth amulets?
6299
If you want to become better at game making, you should attempt to try things out by yourself more often. It's much more fun to create a mechanic when you can come up with a way to make it work by yourself, rather than constantly having to ask for help. Dare to experiment and make discoveries!

But sure, I put the event in its own separate project. Again, keep in mind that you can change around things as you want, as long as you do it consistently.

Here you go. Good luck!
Pages: 1