RMK2K3 EVENT MOVE TOWARD ANOTHER EVENT THAT ISN'T HERO

Posts

Pages: 1
I was wondering if it was possible to have an event like a zombie move toward another event like a person and when they collide a game over is achieved?
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
If there is never any chance for there to be any objects in between the two events, then sure.

event1 is the event that moves towards event2. event2 can move randomly or stay put or whatever. I strongly recommend that if event2 moves, it do so either slower or less frequently than event1, otherwise they will never actually collide.

var1 = event1 x-coor
var2 = event1 y-coor
var3 = event2 x-coor
var4 = event2 y-coor
var5 = var1 - var3
var6 = var2 - var4
var7 = var5
var8 = var6

conditional branch: if var7 < 0
: : var7 is multiplied by -1
end

conditional branch: if var8 < 0
: : var8 is multiplied by -1
end

conditional branch: if var7 > var8
: : conditional branch: if var5 > 0
: : : : move event1 left
: : end
: : conditional branch: if var5 < 0
: : : : move event1 right
: : end
else
: : conditional branch: if var6 > 0
: : : : move event1 up
: : end
: : conditional branch: if var6 < 0
: : : : move event1 down
: : end
end
Thanks, that helps a bunch but how would I make it so when they collide you get game over?
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
Ah, right. Add this at the bottom:

var7 gets increased by var8
conditional branch: if var7 is less than or equal to 1
: : GAME OVER
end

And uh, you might need a "Proceed with Movement" around the end somewhere too, but I'm not sure. Maybe you don't. If you do, just put it anywhere that's not inside a conditional branch.

The entire thing should be a parallel process on the map.
Thank you very much for your help.
Pages: 1