Hey everyone, I'm trying to make a local 4 player, sidescrolling beat 'em up game in VX Ace (making it there because it's just the easiest way I know of doing it). I know how to make basically everything for it but this is something I'm really struggling with.
I have edited a 2 player script to make it 4 player, so I have 4 actual players running around on screen at once.
My question is, how can I check to see WHAT player is next to an event? Don't think you could do this in an event...
Basically what I'm trying to do is determine what character is within attacking range of an enemy, so that I can deal damage accordingly and make it so that if player 4 is punching randomly but player 1 is next to an enemy, it doesn't affect the enemy. Does that make sense? xD
I imagine it would look something a little like this (with a bit of tweaking depending on what script I would be using, and other stuff, of course, just a rough estimate):
Enemy Event
(first page action button trigger, walks toward player(left or right depending on which way he's coming from))
2nd page (this is the page where the sensor would be activated, with a switch like Enemy 1)
if Player 1 is within 2 tiles
---if attack key being pressed
------control Enemy 1 Health variable (-1)
------if Enemy 1 Health variable = 0
---------Erase event
------branch end
---else
------event wait for 80 frames or whatever
------change event graphic to punch
------control Player 1 Health (-1)
---branch end
else
branch end
Obviously there would be a better way to implement the logistics of it, but you get what I'm trying to say xD
I just need a way to differentiate between Player 1, 2, 3, or 4.
Any help would be GREATLY appreciated
