Hey all,
I'm trying in vain to to come up with a way for an event to activate via a parallel process when it is next to another event (X or Y, so when it is in the radius directly around an event)
So far I've tried putting both Events X,Y locations into seperate variables and using conditional branches to compare them but I can't quite get my head around it.
Has anybody managed this, any ideas would be awesome!
EDIT: I'm also using Galv's Move Route Extras for extra functionality but I think this query can be solved without having to borrow script calls from that script, if however you're familiar with this script and have an idea/workaround let me know!
Cheers.
This actually is correct, saving events' X and Y locations into variables and then compare it in conditional branches. However, you have to watch out. There are X, Y and Screen X, Screen Y. You need to choose the X,Y. Screen X, Screen Y serves for capturing their position in pixels on the screen.
Hey dude,
So at the moment I have 2 events that have a parallel process tracking their location that updates every 10 frames. I'm using Map X/Map Y not Screen X/Y (This is right yeah?)
I have 4 Variables:
EVENT 1 USES: X FRIENDLY, Y FRIENDLY
EVENT 2 USES: X ENEMY, Y ENEMY
How do I get it so that when X FRIENDLY is next to X ENEMY (or Y FRIENDLY is next to Y ENEMY) to activate one of my events?
I have a conditional branch that checks a Variable X FRIENDLY == X ENEMY then Y FRIENDLY == Y ENEMY running on a parralel process but it doesn't activate for me so I'm doing something wrong.
'Game Mechanics Design' is for looking at aspects of game play from a more conceptual level. Implementation "How do I...?") questions belong in the Support forum for the engine you are using. Based on the info under your avatar...
Moved to: RPGMaker VX Ace
Screenshots would be better, because if you are describing it like this, it is not so easy to track your mistake.
Because you can have it set in a way where it checks if the two variables are equal, but completely ignore the Y if they are not,
or you can set it in a way that the X gets checked and then regardless of the result Y gets checked.
Or there can be other problems, like scripts overwriting these variables (which I doubt) or a badly set parallel process event location thing).
I'll whip a few screenshots together shortly.
Thanks a bunch dude I'll give that a try and post my results!! This knowledge will create some really powerful systems in my project!
It is a basic feature of Action battle systems. But the potential of basics in rpg maker is infinite 🙂
Ok I'm trying to get my head around it.
" if Friendly Y - Enemy Y is equal to +1 or -1:" how do i put this in a conditonal branch?
(I'm using Pearl ABS but trying to create AI so certain "NPCS" (technically need to be classed as enemies in the ABS) attack other enemies which is sadly not an in built feature of the ABS.)
Var.Friend Y - Var.Enemy Y
If Var.Friend Y < 0
Var.Friend Y * - 1
end
If Var.Friend Y == 1
blah blah blah
End
That should work.
Or simply
if variable is equal to 1:
code
else:
if variable is equal to -1:
code.
* - 1 = What does this translate too in terms used in a conditional branch?
"Less than Or Equal Too"
"Greater Than or equal too"
etc
Hey!
Var.Friend Y * - 1
What does the * equate too in my conditional branch or is this called via a script call?
Nope, he meant this:
If the Y-Y variable is less than 0: Multiply it by -1, to make sure the absolute value is 1.
I've been trying my damdest to get this working but I'm banging my head against a wall here lol
I've uploaded a bare bones project file all setup. (All you need to do is paste it into a new project (I've removed various DLLS and the Executable files due to filesize being to big at 1.4mb lol)
The NPC named FRIENDLY has the move route I'm trying to accomplish when they are 1 tile away from the ENEMY event.
If anybody can have a crack at it for me I'd be eternally grateful, I'll keep trying on my end but I'm tending to make one thing work and breaking something else haha.