GOING ABOUT EVENT TRIGGERED BATTLES IN RPG MAKER

Posts

Pages: 1
charblar
"wait you made this a career?"
3574
Since I've been getting to playing around with some enemies lately I'm wondering how others have used events as their enemies to start battles via battle process to do so since it can be done simply with player touch but doesn't exactly work amazingly.
slash
APATHY IS FOR COWARDS
4158
In the past I've used On Player Touch, and I think that's the standard. It's the easiest way to do it by far, but I agree that the collision management within VX Ace isn't fantastic.

EDIT: ignore me, listen to LockeZ vvv
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Don't ever use On Player Touch for battles! The player can't be attacked while they're moving unless the enemy makes a head-on collision with them, it doesn't work with enemies that aren't constantly moving, and it's so easy to do it properly instead.

This is the right way, it will detect if the player is adjacent to the event:

The enemy event should be set to Parallel Process, and running these event commands:


Note that it calls a common event. The common event should look like this:







If you have multiple touch battles on the same map, you'll need multiple Enemy Distance variables, and each enemy event will need to use a different variable, since the enemies aren't all the same distance from the player. That also means you'll need multiple common events to track the different distances. For example here's a second enemy event on the same map, using the Enemy Distance B variable:



And the Enemy Tracking B common event that it calls:






Also note that, in the enemy events themselves, I'm checking if the Enemy Distance is less than or equal to 1, which means the battle will happen if the player is 1 tile away from the enemy. You can change that to a higher number if you want the player to get in combat with enemies that are 2 or 3 tiles away.
charblar
"wait you made this a career?"
3574
OOh thank you for the great example! I feel this should have gone into Help Me now but welp. VX Ace doesn't have the single X and Y cords though how would I go about that just wondering.
unity
You're magical to me.
12540
author=LockeZ
Don't ever use On Player Touch for battles! The player can't be attacked while they're moving unless the enemy makes a head-on collision with them, it doesn't work with enemies that aren't constantly moving, and it's so easy to do it properly instead.


In VX Ace, I find "On Event Touch" to be pretty reliable, except for flying enemies, which I use a method similar to yours ^_^
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
It works the same way in VX Ace as it does in VX, XP, 2003, 2000, and 95. You can walk parallel to an enemy that's right next to you or behind you forever, even if it's faster than you. It can never "catch" you unless you turn towards it. And if an enemy waits a second between steps, you can stand right in front of it completely safely during that time. It's not good or reliable. It can be functional in tight spaces though, where the player has little control over where they go.
charblar
"wait you made this a career?"
3574
author=LockeZ
It works the same way in VX Ace as it does in VX, XP, 2003, 2000, and 95. You can walk parallel to an enemy that's right next to you or behind you forever, even if it's faster than you. It can never "catch" you unless you turn towards it. And if an enemy waits a second between steps, you can stand right in front of it completely safely during that time. It's not good or reliable. It can be functional in tight spaces though, where the player has little control over where they go.

I meant for the variables sorry you can't get the events x cords and y cords
slash
APATHY IS FOR COWARDS
4158
author=charblar
author=LockeZ
It works the same way in VX Ace as it does in VX, XP, 2003, 2000, and 95. You can walk parallel to an enemy that's right next to you or behind you forever, even if it's faster than you. It can never "catch" you unless you turn towards it. And if an enemy waits a second between steps, you can stand right in front of it completely safely during that time. It's not good or reliable. It can be functional in tight spaces though, where the player has little control over where they go.
I meant for the variables sorry you can't get the events x cords and y cords


I believe you can - if you go to Event Commands -> Set Variable, somewhere in the Map Data section, you can get the X and Y coordinates of any event on the current map and set them to a variable. The X coord has to be one variable and the Y has to be another, so it's a pain, but it can work.

(That might not be the exact location, I don't have VXA in front of me atm)
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
This is how you set a variable equal to an event's X or Y coordinate:
charblar
"wait you made this a career?"
3574
author=LockeZ
This is how you set a variable equal to an event's X or Y coordinate:

Oops I hopped over that character spot I normally wouldn't but thank you!
events are my trigger
sbethune81
I don't have a growth mindset...yet.
2369
If you want a larger customization window, you can set variables to screen x and y instead of map x and y. This uses pixels as opposed to full tiles. This way you could have a battle trigger when an enemy is within 16 pixels in any direction, which would be half a tile away (32 pixels for a full tile). It doesn't add a whole lot of complexity for how much variability it gives you.
Craze
why would i heal when i could equip a morningstar
15170
honestly the only important bit imo is that the battles always have step animation on and face the player at all times
Pages: 1