I know what damage floors are, but in my game I have these thorny thickets that you're not supposed to be able to walk ON. I was wondering if it was possible to make it so that a wall hurt you if you walked into it.
How to make a wall damage you.
RPG Maker VXAce SupportI guess this could be done with an event with the settings: Event touch and Same as characters
If there aren't a lot of walls that do this you can make an event that is set to "Same as Characters" and "Player Touch" that has a Change HP: Entire Party, -X
Yay, it works, thank you!
If you have too many of these thorny thicket walls for touch events to be a reasonable solution you could create a parallel process event that keeps track of your player's coordinates and damages the player that way. In case you want to try it, here is how you would go about doing it.
Create a common event and set the trigger to Parallel Process. Make a condition switch for it and turn it on at the beginning of the game so the event will start processing.
Then make 3 variables and call them something like [Player:X], [Player:Y], and [Player😀irection]. Then mirror these variables to the Game Data using the control variables command in your common event. Like this:
Control Variables: [Player:X] = Player's Map X
Control Variables: [Player:Y] = Player's Map Y
Control Variables: Player😀irection] = Player's Direction
This will keep track where the player is and what direction they are facing at all times while they are on your map. You can then use this data to write conditional branches into your common event that trigger event commands over a wide area. For example:
Let's say you have a 6 tile wide Thorny Thicket Wall on the southern edge of your map that you want to damage the player if they walk into it. Go to your map and get the X,Y coordinates for each tile in front of your wall. For the sake of this example let's say the coordinates are 17,20 - 18,20 - 19,20 - 20,20 - 21,20 - 22,20. Once you have this information you can create a series of conditional branches like this:
Conditional Branch: Player is Facing Down
Conditional Branch: Variable [Player:X] >= 17
Conditional Branch: Variable [Player:X] <= 22
Conditional Branch: Variable [Player:Y] == 20
Change HP: Entire Party, - 1
Flash Screen: 255, 255, 255, 255, @60
Play SE: 'Absorb1', 80, 100
Set Move Route: Player(Wait)
$> Move Up
$> Turn Down
Branch End
Branch End
Branch End
Branch End
This would cause the party to lose 1 HP and the player to move backward as if he got knocked back by damage every time they walk toward your Thorny Thickets.
You can also easy and fastly go at the database and then click at tileset and then at
Damaged floor at the left and then you only choose a brick that you maker a new tileset
graphics and then you got it ! You save it at A , B , C , D , E ... And then when you will
click on ... This will work surely ! When touch on ... It may work ...
It 100 % Work for me !
Yay !
Hope that help yourself bro!. 😀
Damaged floor at the left and then you only choose a brick that you maker a new tileset
graphics and then you got it ! You save it at A , B , C , D , E ... And then when you will
click on ... This will work surely ! When touch on ... It may work ...
It 100 % Work for me !
Yay !
Hope that help yourself bro!. 😀
Wait, you can have "too many"...?
I think in the sense that if you have a large number of events it can cause lag.
I think the best solution is the one suggested by SkyAce, i.e. have one tile that you use to make the bush (it can be identical to an ordinary one) which you set to terrain damage in the tileset tab of the data base. That way you don't need any events at all. You just have to remember not to use that tile anywhere else.
I think the best solution is the one suggested by SkyAce, i.e. have one tile that you use to make the bush (it can be identical to an ordinary one) which you set to terrain damage in the tileset tab of the data base. That way you don't need any events at all. You just have to remember not to use that tile anywhere else.
The maker can't handle but so many events at once or it starts to lag really bad. It's hard to give an exact number but it's a good idea to keep them as limited as possible. I found this out the hard way when I had over 100 events at once and the lag was so bad it made me re-design my game.
The way I showed you is the best way I know how to make one event command cover many tiles. That way you don't have to create a single event for each tile you want to trigger something.
Your method is really confusing to me... it would definitely be helpful, because in one stage of my game all of the borders, plus obstacles, are those thorns.
But it's all pretty gibberish to me and I'd need someone to walk me through it... I have something called TeamViewer if you wouldn't mind helping.
Koi,
Another alternative is to put a moving event on top of your thorn bushes and have it set to go off if the player triggers it. Set movement to custom and have it move toward player, skip if can't move. Set the speed to x4 faster and frequency highest so that the event can keep up with the player walking around it. When the player runs into the wandering event, it gets fired off and does damage or whatever.
The trick is in constraining the event. What I did was use Yanfly's Restrict Region script
http://yanflychannel.wordpress.com/rmvxa/field-scripts/move-restrict-region/
and I painted around the obstacle so my event wouldn't wander off. If for some reason you need to make your terrain so the event can walk on it, you can always use the move restrict region to keep the player off of it.
The cool thing about this approach is that then you can have all kinds of winding mazes with a couple of events covering them. Maybe.
Another alternative is to put a moving event on top of your thorn bushes and have it set to go off if the player triggers it. Set movement to custom and have it move toward player, skip if can't move. Set the speed to x4 faster and frequency highest so that the event can keep up with the player walking around it. When the player runs into the wandering event, it gets fired off and does damage or whatever.
The trick is in constraining the event. What I did was use Yanfly's Restrict Region script
http://yanflychannel.wordpress.com/rmvxa/field-scripts/move-restrict-region/
and I painted around the obstacle so my event wouldn't wander off. If for some reason you need to make your terrain so the event can walk on it, you can always use the move restrict region to keep the player off of it.
The cool thing about this approach is that then you can have all kinds of winding mazes with a couple of events covering them. Maybe.
Hmm. I could definitely use this!
However, it says "<npc restrict>"
How do I tell the game which event to restrict?
The real answer to that would be to mod the script so that it would accept one or more event IDs as attributes. However, I'm terrified by Yanfly's dire warnings (not to mention I don't know enough Ruby to do it yet and submit for consideration to the original author) so I tried the following instead of my first suggestion.
1. I used an auto-tile and put an event on top of it. Events can move freely on top and can't get off, except the bottom -- I'm not smart enough to know why;
2. Put a tile below the ends of your thorny barrier that allow movement from a tile on top but not below. This allows your wandering event to get next to you, but not escape off the auto-tile;
and/or
Create a complete set of thorny bushes with directional arrows that keep your event on top of it. (Think of the examples at the bottom of the default exterior tile set.)
It sounds like this is a big enough part of your game that it might be worth the extra tiles you'd have to set aside in a tile set and possible confusion when creating the map to do it this way. And then you can have events wandering around the paths as well, and save the regions for other things -- or do both together depending?
And maybe one of the might script gods will swoop over this topic and grace us with an enhancement to the Yanfly script and give us more options to choose from. ;-)
1. I used an auto-tile and put an event on top of it. Events can move freely on top and can't get off, except the bottom -- I'm not smart enough to know why;
2. Put a tile below the ends of your thorny barrier that allow movement from a tile on top but not below. This allows your wandering event to get next to you, but not escape off the auto-tile;
and/or
Create a complete set of thorny bushes with directional arrows that keep your event on top of it. (Think of the examples at the bottom of the default exterior tile set.)
It sounds like this is a big enough part of your game that it might be worth the extra tiles you'd have to set aside in a tile set and possible confusion when creating the map to do it this way. And then you can have events wandering around the paths as well, and save the regions for other things -- or do both together depending?
And maybe one of the might script gods will swoop over this topic and grace us with an enhancement to the Yanfly script and give us more options to choose from. ;-)
That script looks like it just stops events from going "out of bounds", when the bounds are defined by an outline using region ids.
Here's a Region Common Events script I whipped up. It's very basic, but it should let you take care of your damage from walls and splash sound effects without having to use events.
One issue might be that it just looks at what's in front of you - you don't actually have to try to walk into it. So if you walk up to a wall but don't actually push the arrow to try and walk into it, the common event would still run. You MAY be able to get around that by adding a conditional branch to see if the up arrow is pressed to your common event.
Here's a Region Common Events script I whipped up. It's very basic, but it should let you take care of your damage from walls and splash sound effects without having to use events.
One issue might be that it just looks at what's in front of you - you don't actually have to try to walk into it. So if you walk up to a wall but don't actually push the arrow to try and walk into it, the common event would still run. You MAY be able to get around that by adding a conditional branch to see if the up arrow is pressed to your common event.
Sorry I tried to explain it as well as I could. I'm not sure what TeamViewer is, but I don't mind walking you through it. It looks a lot more complicated than it is.
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-wall-damage-you.17259/