RM2K3 [HELP] DODGEBALL-TYPE EVENT
Posts
Pages:
1
New here, so please bear with me. This seemed like a relatively simple idea, but it's becoming far more complicated. It's a school setting, and your hero is moving right-left against a wall while the 'coach' (an NPC) throws balls at him which he will try to dodge x number of times, winning prizes for dodging so many balls and so forth. Perhaps one of the problems is that the coach is also simultaneously moving right-left from his position and firing these balls at you. I set up the coding to start the ball at Coach's x and y, then shoot straight up every so often, followed by a check if it matches your x-y to see if that's a hit or dodge. One prob is that it refuses to acknowledge that the ball's Y has changed at all once it moves, so it can never match Hero's Y pos! Any ideas on how to resolve this?
Thanks
Thanks
I would recommend collision detention with an "event:touch hero" activation instead of using coordinate variables, it will be easier.
Try adding a wait for 0.0 (this is actually helpful) or just a 0.1 s pause before rechecking the coordinates.
Also, make sure that the coach x and y and the hero x and y use four different variables. It's very easy to assign the wrong ones by mistake.
I'm not totally understanding your question, so hopefully that will help, but if you give me more specifics we will be able to work this out.
Try adding a wait for 0.0 (this is actually helpful) or just a 0.1 s pause before rechecking the coordinates.
Also, make sure that the coach x and y and the hero x and y use four different variables. It's very easy to assign the wrong ones by mistake.
I'm not totally understanding your question, so hopefully that will help, but if you give me more specifics we will be able to work this out.
Thank you for responding.
The coach x/y and the hero x/y are definitely 4 different variables. I've checked and rechecked that one.
I'll try the wait and the "event:touch hero", though I imagine that will only be helpful for hits, not tracking misses.
If you want me to, maybe I could post some of the coding or something.
The coach x/y and the hero x/y are definitely 4 different variables. I've checked and rechecked that one.
I'll try the wait and the "event:touch hero", though I imagine that will only be helpful for hits, not tracking misses.
If you want me to, maybe I could post some of the coding or something.
Divide the minigame arena into LANES or COLUMNS, however you want to call it.
Say you have 5 different columns.
Have a separate "ball" being thrown from each column depending on which lane the coach is in (keep the ball in each lane invisible and change graphic to visible when thrown)
Then have switches track which lane the hero is in, changing when he jumps from one lane to the other.
Ex. (Hero is in lane one, jumps to lane two = Move Route - Switch HeroLaneONE OFF, Begin Jump, Move right, End JUMP, Switch HeroLaneTWO ON)
- This way he won't be hit if the ball is in the danger zone MID JUMP and before he's done "changing coordinates".
Have the ball's defined movement route Turn ON a Switch once it reaches the "danger zone" for the Hero. Parallel check if the hero lane switch is one simultaneous with the ball being in the danger zone = hero hit by ball.
I did this quick little minigame without ever using X,Y coordinates. The graphics suck but you get the idea.
Uh, hold on, I just realized that this recording doesn't show him getting hit at all. Let me rerecord and upload one with him taking damage.
There you go.
Say you have 5 different columns.
Have a separate "ball" being thrown from each column depending on which lane the coach is in (keep the ball in each lane invisible and change graphic to visible when thrown)
Then have switches track which lane the hero is in, changing when he jumps from one lane to the other.
Ex. (Hero is in lane one, jumps to lane two = Move Route - Switch HeroLaneONE OFF, Begin Jump, Move right, End JUMP, Switch HeroLaneTWO ON)
- This way he won't be hit if the ball is in the danger zone MID JUMP and before he's done "changing coordinates".
Have the ball's defined movement route Turn ON a Switch once it reaches the "danger zone" for the Hero. Parallel check if the hero lane switch is one simultaneous with the ball being in the danger zone = hero hit by ball.
I did this quick little minigame without ever using X,Y coordinates. The graphics suck but you get the idea.
Uh, hold on, I just realized that this recording doesn't show him getting hit at all. Let me rerecord and upload one with him taking damage.
There you go.
That's one way, although I wouldn't recommend it. If you're going to use conditional branches to track the hero you might as well use X, Y coordinates.
I was interested in creating this kind of minigame, so here's what I created.
http://rpgmaker.net/media/content/users/9179/locker/Dodgeball.rar
This way may have a bit more code, but it's more flexible and dynamic. I should be able to create a way to catch the ball, too. I might add this to my game :D
I was interested in creating this kind of minigame, so here's what I created.
http://rpgmaker.net/media/content/users/9179/locker/Dodgeball.rar
This way may have a bit more code, but it's more flexible and dynamic. I should be able to create a way to catch the ball, too. I might add this to my game :D
author=Link_2112
I should be able to create a way to catch the ball, too. I might add this to my game :D
Catching the ball is a great idea. Give you an key input opportunity if the ball is right in front of the hero.
author=Sauceauthor=Link_2112Catching the ball is a great idea. Give you an key input opportunity if the ball is right in front of the hero.
I should be able to create a way to catch the ball, too. I might add this to my game :D
Something like that. With my setup, I'd probably go with a key input processing checking if you are holding SHIFT. In the event that checks if the ball hits you, I'd add a branch checking if you are holding SHIFT. It would bypass the damage code and instead run some catch ball code.
author=Link_2112
Something like that. With my setup, I'd probably go with a key input processing checking if you are holding SHIFT. In the event that checks if the ball hits you, I'd add a branch checking if you are holding SHIFT. It would bypass the damage code and instead run some catch ball code.
The only concern would be not allowing the gamer to hold SHIFT before the correct time. Maybe check if SHIFT is being held too early and then penalize by letting you get hit?
Depends on how the game works. If I made this it wouldn't be some punk kid getting pelted with balls, it would be full court dodge ball. So I would prefer allowing an early button press, possibly having it drop his hands after a few seconds. Did you ever play any of the Super Dodge Ball games? Like that. It's a solid setup.
author=Link_2112
Depends on how the game works. If I made this it wouldn't be some punk kid getting pelted with balls, it would be full court dodge ball. So I would prefer allowing an early button press, possibly having it drop his hands after a few seconds. Did you ever play any of the Super Dodge Ball games? Like that. It's a solid setup.
Right. I suggested my simple setup cause OP was talking about a 1v1 setup with only left/right movement. A full dodgeball game would be a different story.
Pages:
1















