WALKING IN TALL GRASS WITHOUT MULTIPLE EVENTS?
Posts
Pages:
1
!!! SOLVED !!! ~~~ Thanks to Narcodis for helping me. Here's what you do... (for rpg maker 2003)

ADDITIONAL ADVICE: This is a parallel process event, however, if you set it to call, and have another common event on parallel process which manages all other parallel process common events by calling them within it. It makes things cleaner, and makes it easier on the game's engine. :)
You can also use this to do other things that change your charset. It could turn on switches that causes noise, which would alert monsters to come after you, etc. :) Anything you want! ^O^
-Below is what my problem was, before it was solved-
(i'm using RPG Maker 2003)
Have you noticed in games like Zelda: A Link To The Past, when Link walks in tall grass, it would show grass around the feet of his sprite, and when he stepped off the grass, the grass around his feet would disappear?
I want to be able to have ground tiles set to where you step on them, it automatically triggers your charset to change with grass around your feet, or with water ripples if you're walking in water, etc, and automatically switch back when you step off.
The only other way I have done this was with having a bunch of events all over the grass to turn on the switch which activates the charset change, and then more events around the grass that turns off the switch. It's a lot of events, and I don't like like copying and pasting so many events.
Is there any other way to do this without using so many events?

ADDITIONAL ADVICE: This is a parallel process event, however, if you set it to call, and have another common event on parallel process which manages all other parallel process common events by calling them within it. It makes things cleaner, and makes it easier on the game's engine. :)
You can also use this to do other things that change your charset. It could turn on switches that causes noise, which would alert monsters to come after you, etc. :) Anything you want! ^O^
-Below is what my problem was, before it was solved-
(i'm using RPG Maker 2003)
Have you noticed in games like Zelda: A Link To The Past, when Link walks in tall grass, it would show grass around the feet of his sprite, and when he stepped off the grass, the grass around his feet would disappear?
I want to be able to have ground tiles set to where you step on them, it automatically triggers your charset to change with grass around your feet, or with water ripples if you're walking in water, etc, and automatically switch back when you step off.
The only other way I have done this was with having a bunch of events all over the grass to turn on the switch which activates the charset change, and then more events around the grass that turns off the switch. It's a lot of events, and I don't like like copying and pasting so many events.
Is there any other way to do this without using so many events?
My first instinct is to say work something out using Terrain IDs, so that a parallel process event checks to see if they're in the grass, and if they are, the charset changes. I'm not entirely sure how well you can do that in some of the older makers, but I'm sure there's a script for VX out there. If you could tell us what maker you are using, that'd help us figure out a solution better.
Depending on the internal workings of the maker, loads of events may actually speed wise be better than a parallel process common event.
you might not be able to hack it without multiple events; you could definitely achieve it- albeit rather sloppily and there's probably a more elegant way- by placing events all around the edges of grass/water/whatever that trigger the charset change. it wouldn't maybe be the prettiest thing in-editor, but it would be at very least functional.
A single parallel common event that checks the terrain ID of the hero's coordinates and changes the character set to WalkingInGrass.png when in grass, and NotWalkingInGrass.png when not would be the best and most practical method of doing things.
author=narcodis:O! I'll give that a try. Do you know how I would go about setting that event up?
A single parallel common event that checks the terrain ID of the hero's coordinates and changes the character set to WalkingInGrass.png when in grass, and NotWalkingInGrass.png when not would be the best and most practical method of doing things.
author=FelixFlywheelauthor=narcodis:O! I'll give that a try. Do you know how I would go about setting that event up?
A single parallel common event that checks the terrain ID of the hero's coordinates and changes the character set to WalkingInGrass.png when in grass, and NotWalkingInGrass.png when not would be the best and most practical method of doing things.
First off, you'll need to make sure you've got a specific terrain ID set aside for the "Grass" (lets say Terrain ID 2).
You'd need three variables. Two to store the X and Y coordinates of the hero, and one to store the Terrain ID of the tile the hero is standing on. (HeroX, HeroY, and TerrainID).
In Common Events, set up a Parallel Process event. In that event, start with setting the HeroX and HeroY variable to the Sprite "Hero"'s respective X and Y coordinates.
Then get the Terrain ID of the tile at (HeroX,HeroY).
Then set up a conditional branch following that.
If TerrainID = 2 {
Change Hero Graphic to Walking in Grass
}
Else {
Change Hero Graphic to Not Walking in Grass
}
At this point it should work in theory. There might be some tweaking needed, and this will definitely interfere with events that try to change your hero graphic in the future. For that, you might want to set the entire common event here to only be active when a switch is on.
Hope that helped.
author=narcodisFor the most part, it works on activating the 'not in grass' charset, but it doesn't seem to work when you step in the grass... Yeah, it has to be tweaked.. >.<; but thanks, this did help me at learning about storing coordinates in variables, because I didn't know how to do that before. ^o^author=FelixFlywheelFirst off, you'll need to make sure you've got a specific terrain ID set aside for the "Grass" (lets say Terrain ID 2).author=narcodis:O! I'll give that a try. Do you know how I would go about setting that event up?
A single parallel common event that checks the terrain ID of the hero's coordinates and changes the character set to WalkingInGrass.png when in grass, and NotWalkingInGrass.png when not would be the best and most practical method of doing things.
You'd need three variables. Two to store the X and Y coordinates of the hero, and one to store the Terrain ID of the tile the hero is standing on. (HeroX, HeroY, and TerrainID).
In Common Events, set up a Parallel Process event. In that event, start with setting the HeroX and HeroY variable to the Sprite "Hero"'s respective X and Y coordinates.
Then get the Terrain ID of the tile at (HeroX,HeroY).
Then set up a conditional branch following that.
If TerrainID = 2 {
Change Hero Graphic to Walking in Grass
}
Else {
Change Hero Graphic to Not Walking in Grass
}
At this point it should work in theory. There might be some tweaking needed, and this will definitely interfere with events that try to change your hero graphic in the future. For that, you might want to set the entire common event here to only be active when a switch is on.
Hope that helped.
Here's a snapshot of the comment event. I set it on call because I have a main parallel process that manages the common events. So it worked at keeping the charset in 'not in grass' form.

According to that screenshot, you're storing the terrain ID, using your variable 0043:terrain.id as the X and Y coordinates. Fix that to be 0041:hero.x and 0042:hero.y, and it should work.
It worked!!! Thank you soo much!!! ^O^!!! I've been wanting to do this for years. I can't believe it was actually this simple. xD!!!
is there any reason you used a call common event with a conditional branch rather than a parallel process common event with a trigger switch?
author=geodudeOh, because I have a main parallel process event that manages all other parallel processes by calling them within it, which makes things cleaner, and doesn't lag the system. However, I just changed the picture above to parallel process in case someone didn't understand, like yourself.
is there any reason you used a call common event with a conditional branch rather than a parallel process common event with a trigger switch?
With a Call trigger, the event only runs when called. With a Parallel Process trigger, the event tries to run every step of the engine. Better to only have one parallel process event that runs each "active" event in turn, than to try and run them all at once, parallel. Avoids lag & slowdown.
author=BlitzenHaha yeah, I just wrote that above. xD!!!
With a Call trigger, the event only runs when called. With a Parallel Process trigger, the event tries to run every step of the engine. Better to only have one parallel process event that runs each "active" event in turn, than to try and run them all at once, parallel. Avoids lag & slowdown.
Pages:
1



















