ABS question , how to add increase attack dam to RNG dam based on event looking away from player

Screenshot_11.jpg


so like i was wondering if event is facing away from player your RNG does more damage. how would you do this

like event is facing away from player do RNG Damage BUT do *2 RNG dam if event is facing away from player. but i dont know how to do that

but then if event is on the side from the player does *1.5 RNG dam

ok so i know i can make it so if the event is face down,left,right,up BUT what about if the player is facing toward the event but the event is facing away from player how do you do THAT then?

event is facing up from player but the do you event it check to see which direction the player is facing? or ? like this?

Screenshot_13.jpg
I don't know how your battle system works. Do you just interact with an event and that triggers an attack?

When you encounter an issue like this, you need to go through all possible relevant cases and assign behavior accordingly. These seem to be the cases you want for this:

  • If the rat is facing left, you want the player to be to its right to trigger the higher damage. So you check for an x position that is higher than the rat's, and a y position that is equal.
  • Facing right, x is lower, y is equal.
  • Facing up, x is equal, y is higher.
  • Facing down, x is equal, y is lower
If any of these cases are true, you deal the higher damage.

As a side note, with your current event setup, it is possible for the rat's HP to be negative, and for the message to say something like "Rat has -3 health left out of 50 health"
I would use conditional branches and if statements correct?


Heres my full event page gb3792

yeah i do get that too

Screenshot_13.jpg
Screenshot_11.jpg


my other little issue is the knock back from being hit. . . cant figure out how to do that. tried to a jump event but reverse.... yeah... *scratches his head* not sure i coded that right

  • If the rat is facing left, you want the player to be to its right to trigger the higher damage. So you check for an x position that is higher than the rat's, and a y position that is equal.
  • Facing right, x is lower, y is equal.
  • Facing up, x is equal, y is higher.
  • Facing down, x is equal, y is lower
how do you check x and y position of a character / event please i cant seem to find that coding
You have to mess around with variables for that. You can set a variable to an event's (or the player's) x or y position. You need to do that for the player's and enemy's x and y positions and then compare the values to each other.

If you want to do it in a more compact manner, there are also script calls, but at this point while you're still learning the basics, it might be better to stick to pure eventing.
You have to mess around with variables for that. You can set a variable to an event's (or the player's) x or y position. You need to do that for the player's and enemy's x and y positions and then compare the values to each other.

If you want to do it in a more compact manner, there are also script calls, but at this point while you're still learning the basics, it might be better to stick to pure eventing.
that is correct i am still learning how to do this : ) so set each position to a val

player look up = val
player look down = another val?
1692825107866.png


Like this, basically. Nested conditionals that check the enemy event's facing and then compares the variables.
wow thank you ^^

Original thread: https://forums.rpgmakerweb.com/threads/abs-question-how-to-add-increase-attack-dam-to-rng-dam-based-on-event-looking-away-from-player.160552/