Status
Not open for further replies.

Runnyyy

Veteran
Veteran
Joined
Nov 16, 2019
Messages
36
Reaction score
5
First Language
English
Primarily Uses
RMMV
HELLO I hope i'm in the right topic this time;;

I'm trying so hard to figure out a simple mechanic:

I want to have fireballs (or any projectile) continuously shoot from wall to wall, and if the Player
touches the projectile, will be injured. (Player would need to time correctly when to move ahead
or else they will be injured)

I'm completely stuck as this is hard to explain in search engines for the "specific" "trap" or "puzzle" I need!

I'm using RPG Maker MV (Steam edition)

I've included a screenshot so maybe it will help explain:

forum-screen.png
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,883
Reaction score
14,993
First Language
English
Primarily Uses
RMMV
Wrong place :) "How do I ..." questions go into the support forum.

You just give your fireball event a custom autonomous move route (this is in the settings near the sprite, NOT the Move Route event command), set to repeat, that makes it go back and forth. Set it to THROUGH, and the trigger is Event Touch. In the event commands, add whatever you want to happen when they collide. Maybe add a 120 frame Wait after that, to give the player time to move away after being hit (ie - they're not hit repeatedly, but just once, unless they just stay on the tile).
 

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,610
Reaction score
5,510
First Language
english
Primarily Uses
RMMZ
Game Mechanics Design is meant for discussing mechanics and their uses, not for finding help with how to set something up.

Moving to MV Support.

 

J-G

Veteran
Member
Joined
Oct 4, 2019
Messages
669
Reaction score
164
First Language
English
Primarily Uses
RMMV
How do you have the fireball evented? It should be parallel and possibly have it set as a loop somewhere in the event. Depending how it's evented that is.
 

Runnyyy

Veteran
Veteran
Joined
Nov 16, 2019
Messages
36
Reaction score
5
First Language
English
Primarily Uses
RMMV
Wrong place :) "How do I ..." questions go into the support forum.

You just give your fireball event a custom autonomous move route (this is in the settings near the sprite, NOT the Move Route event command), set to repeat, that makes it go back and forth. Set it to THROUGH, and the trigger is Event Touch. In the event commands, add whatever you want to happen when they collide. Maybe add a 120 frame Wait after that, to give the player time to move away after being hit (ie - they're not hit repeatedly, but just once, unless they just stay on the tile).

Ah sorry about that! Well, This sort of created a new issue: when I have the fireball set to: "through", it keeps going off the map and doesn't repeat, despite me having it do so (screenshot below)

forum-screen2.png

Also included in the screenshot: A simple test to make the screen flash once the player is touched, but even with this placed, nothing seems to happen unless Harold/player actually interacts (re: presses enter/Z/Clicks on). Then the fireball stops moving. I'm not sure how to fix this now haha...
 

Runnyyy

Veteran
Veteran
Joined
Nov 16, 2019
Messages
36
Reaction score
5
First Language
English
Primarily Uses
RMMV
How do you have the fireball evented? It should be parallel and possibly have it set as a loop somewhere in the event. Depending how it's evented that is.

I'm not sure what you mean? The fireball can be chosen as any other tile/character in events when
you double click to make a new event, scroll to !Flame and it should be there. I've tried setting it up as Parallel AND with loop but I can't seem to figure out how looping works properly. With your method, the fireball moves, meets the wall, then stays put even after using loop...
 

J-G

Veteran
Member
Joined
Oct 4, 2019
Messages
669
Reaction score
164
First Language
English
Primarily Uses
RMMV
You need to have a second event active. So that when the fireball hits the player or wall it goes to page 2 of the event via self switch. Then in the second event have it repeat the fireball patter and then if it hits again it goes back to first page of event by turning off the first self switch this will make it repeat.

Keep them both at event touch as well.
Making sure to erase the event once it touches the wall or player of course. Otherwise you will have it stuck
 

Runnyyy

Veteran
Veteran
Joined
Nov 16, 2019
Messages
36
Reaction score
5
First Language
English
Primarily Uses
RMMV
You need to have a second event active. So that when the fireball hits the player or wall it goes to page 2 of the event via self switch. Then in the second event have it repeat the fireball patter and then if it hits again it goes back to first page of event by turning off the first self switch this will make it repeat.

Keep them both at event touch as well.
Making sure to erase the event once it touches the wall or player of course. Otherwise you will have it stuck

I'm sorry, this is a bit confusing and hard for me to grasp;;; What exactly should I put in the second event to make it use a self switch?
I know event touch, but how can I make it know when it touches anything specific? What I'm asking is: what do i put into the event
to make it do what you're explaining to me? haha I'm sorry;;
 

J-G

Veteran
Member
Joined
Oct 4, 2019
Messages
669
Reaction score
164
First Language
English
Primarily Uses
RMMV
It's a bit late so I'll make an event for you and send screenshot on how it should be evented tomorrow afternoon.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,883
Reaction score
14,993
First Language
English
Primarily Uses
RMMV
when I have the fireball set to: "through", it keeps going off the map and doesn't repeat, despite me having it do so

That's odd behaviour. Can you try it in a brand new project with no plugins, and see if it does the same thing?

I don't believe you need a second event or a parallel process. If you want the fireball to disappear after hitting the player, just turn on self switch B as part of your event commands, then add a second page conditioned by that self switch.
 

Runnyyy

Veteran
Veteran
Joined
Nov 16, 2019
Messages
36
Reaction score
5
First Language
English
Primarily Uses
RMMV
That's odd behaviour. Can you try it in a brand new project with no plugins, and see if it does the same thing?

I don't believe you need a second event or a parallel process. If you want the fireball to disappear after hitting the player, just turn on self switch B as part of your event commands, then add a second page conditioned by that self switch.

Actually, I was able to "fix" the fireball flying off the map, I'm not sure what did it but I did add another line for: Set this event, movement: through ON so maybe that had to do with it?

Either way, the fireball IS repeating properly, but now I'm stuck with the issue of nothing happening even if the player is touched by it. (it passes over/through the player), I'd like the fireballs to continuously move back and forth and not disappear if touched.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,883
Reaction score
14,993
First Language
English
Primarily Uses
RMMV
Oh - you've done the wait wrong. Don't put it in a move route - the event can only have one move route, and if you do a Move Route command, it cancels the autonomous move route.

So - THROUGH is on. You might want to put Stepping Animation on as well. Autonomous, custom move route to move back and forth. Trigger set to Event Touch.

Event commands will be play sound, flash screen, Wait X frames. This Wait command is on the second tab, and it's called Wait. This should not make the event stop moving, but it will stop it running additional commands (colliding with the player) giving the player a chance to get out of the way.

Why do you have the commands inside a condition? IS Harold in the party? If he's not, that's why it's not doing anything when it hits you. Unless there's a reason, get rid of the condition and just have the "hit" commands in there.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
412
First Language
German
Primarily Uses
RMMV
I made something like OP wants some time ago, it wasnt very simple, but it seems to work.
https://steamcommunity.com/sharedfiles/filedetails/?id=1312610514

Its old and uses some Code trick to Keep moveroute while changing eventpages but maybe it helps, it's mostly copy and paste.

Edit: If you continue your mechanic,
I would also recomment having the Fireball just move its Moveroute and be on through on, another Event will turn the fireball invisible if he hits the Player, and its own moveroute will make it visible again when it starts its moveroute.
To reset Event Position within its autonomous moveroute, you can use this Scriptline:
Code:
$gameMap.events()[ this._eventId - 1 ].setPosition( $dataMap.events[ this._eventId ].x, $dataMap.events[ this._eventId ].y );
or if you want this Event to start from the same Position of which FIREBALL Event id5 starts, just use this:
Code:
$gameMap.events()[ this._eventId - 1 ].setPosition( $dataMap.events[ 5 ].x, $dataMap.events[ 5 ].y );
Both place the Event back to its origin Position or to the one of the Chosen Event id.

Also Map Coordinates dont work well if you use fast moving fireballs, because the mapcoordinate updates while the eventgraphic still appears to be on the previous maptile. This Ends up in visible hits not counting as hits, and not visible hits counting.
Using Screen Coordinates solves this Problem.

You would Need one parallel Event which is checking the collisions between Player and fireballs. When FIREBALL hits Player, turn Fireball invisible. And Play Animation on Player and Maybe teleport him back or let him loose some hp, Play Sound efect and so on.
 
Last edited:

J-G

Veteran
Member
Joined
Oct 4, 2019
Messages
669
Reaction score
164
First Language
English
Primarily Uses
RMMV
But you do want the fireball to pause for a bit to give the player time to move right? Or no?

Edit* okay my computer doesn't want to screenshot so I'll explain what I did.
1st event will be parallel, no image. In the event have it set to activate a switch. For my example my switch name is fire, then have self switch A under it. Then on the same event have a 2nd page.
Here you can add wait time between each fire ball if they hit.
So I added wait 60 frames,
If condition branch that says if switch fire is off
Set event location (set it to the spot it will reappear again at)
Control self switch A off

Now the actual fireball event should be
Active with the fire switch and should have with in the event something like this.
Change HP (either party or specific characters, your choice)
Flash screen after hit if you want
Play SE if you want
Show animation for the hit if you want
Have the event set as Event Touch and same as player.
Custom route to lead all the way to the wall. (This should be set on the route option next to the fire image) then make sure at the end of the route add, switch fire(or whatever you named it to be "off")

That's it. Event should work perfect
 
Last edited:

Runnyyy

Veteran
Veteran
Joined
Nov 16, 2019
Messages
36
Reaction score
5
First Language
English
Primarily Uses
RMMV
Oh - you've done the wait wrong. Don't put it in a move route - the event can only have one move route, and if you do a Move Route command, it cancels the autonomous move route.

So - THROUGH is on. You might want to put Stepping Animation on as well. Autonomous, custom move route to move back and forth. Trigger set to Event Touch.

Event commands will be play sound, flash screen, Wait X frames. This Wait command is on the second tab, and it's called Wait. This should not make the event stop moving, but it will stop it running additional commands (colliding with the player) giving the player a chance to get out of the way.

Why do you have the commands inside a condition? IS Harold in the party? If he's not, that's why it's not doing anything when it hits you. Unless there's a reason, get rid of the condition and just have the "hit" commands in there.

Ahh, now for some reason, the event only triggers if harold/player interacts with the fireball from the side...I changed everything as you've suggested (minus the inflict portion as I'm still testing)

forum-screen3.png

and the fireball passes over the player, but if i stand a tile next to it and interact
with it, it will activate the contents even when event touch is enabled...

But you do want the fireball to pause for a bit to give the player time to move right? Or no?

Edit* okay my computer doesn't want to screenshot so I'll explain what I did.
1st event will be parallel, no image. In the event have it set to activate a switch. For my example my switch name is fire, then have self switch A under it. Then on the same event have a 2nd page.
Here you can add wait time between each fire ball if they hit.
So I added wait 60 frames,
If condition branch that says if switch fire is off
Set event location (set it to the spot it will reappear again at)
Control self switch A off

Now the actual fireball event should be
Active with the fire switch and should have with in the event something like this.
Change HP (either party or specific characters, your choice)
Flash screen after hit if you want
Play SE if you want
Show animation for the hit if you want
Have the event set as Event Touch and same as player.
Custom route to lead all the way to the wall. (This should be set on the route option next to the fire image) then make sure at the end of the route add, switch fire(or whatever you named it to be "off")

That's it. Event should work perfect

Well, I tried this and now the event or fireball itself moves down, back up and once it
collides with the wall, it disappears;; here's some screenshots of my conditions:

forum-screen4.png

for the conditions of the first switch

and

forum-screen5.png

For the fireball.

I made something like OP wants some time ago, it wasnt very simple, but it seems to work.
https://steamcommunity.com/sharedfiles/filedetails/?id=1312610514

Its old and uses some Code trick to Keep moveroute while changing eventpages but maybe it helps, it's mostly copy and paste.

Edit: If you continue your mechanic,
I would also recomment having the Fireball just move its Moveroute and be on through on, another Event will turn the fireball invisible if he hits the Player, and its own moveroute will make it visible again when it starts its moveroute.
To reset Event Position within its autonomous moveroute, you can use this Scriptline:
Code:
$gameMap.events()[ this._eventId - 1 ].setPosition( $dataMap.events[ this._eventId ].x, $dataMap.events[ this._eventId ].y );
or if you want this Event to start from the same Position of which FIREBALL Event id5 starts, just use this:
Code:
$gameMap.events()[ this._eventId - 1 ].setPosition( $dataMap.events[ 5 ].x, $dataMap.events[ 5 ].y );
Both place the Event back to its origin Position or to the one of the Chosen Event id.

Also Map Coordinates dont work well if you use fast moving fireballs, because the mapcoordinate updates while the eventgraphic still appears to be on the previous maptile. This Ends up in visible hits not counting as hits, and not visible hits counting.
Using Screen Coordinates solves this Problem.

You would Need one parallel Event which is checking the collisions between Player and fireballs. When FIREBALL hits Player, turn Fireball invisible. And Play Animation on Player and Maybe teleport him back or let him loose some hp, Play Sound efect and so on.

yeah that script does seem kind of complex and i'd hate to have to include such effort every time I want a particular puzzle like this...if I can't find a solution any other way, I'll try this one out, thank you!
 
Last edited by a moderator:

J-G

Veteran
Member
Joined
Oct 4, 2019
Messages
669
Reaction score
164
First Language
English
Primarily Uses
RMMV
So then do you want it to just bounce back and forth? If so then you don't need the event location part to be included after each movement route set. Instead have it set if it collides to reset the event location. So the player has a chance to avoid the constant hits
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,883
Reaction score
14,993
First Language
English
Primarily Uses
RMMV
It seems you have several people assisting you with this, all with different approaches. If you are trying to listen and follow everyone's advise, your event is never going to work.

So I will step out and let the others continue to help.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
412
First Language
German
Primarily Uses
RMMV
I have to apologize, my Workshop link got an error, the fireballs will not Restart when map is reloading, and yes the Code is dirty and not very
easy. i would recomment the other Evented Solutions.

Eventing this in Theory:
1st Parallel Event for Hit detection of Fireballs 1 to ???. We can help with variables and conditions for hit detection.
2nd Parallel Event to Start the Fireballs in the correct Timing. (Containing Setting their Position and moveroute) This allows Fireballs to Move even if far outside of the visible screen.
FIREBALL Events on Through having a graphic.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,729
Reaction score
5,760
First Language
Dutch
Primarily Uses
RMXP
@Runnyyy I merged your triple posts together. If you want quote more than one post, you can use the Multiquote button/+Quote all posts and then insert them below. Alternatively, you can just @ their username like I did in this post.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
412
First Language
German
Primarily Uses
RMMV
Event touch doesnt work if the Event is on through on.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Well. Looks like I need to redo the entire battle system in order to have the things I want in it. Also I'd like to say that console.log() is the greatest function in Javascript XD.
I have made 60 new skills! ''after test'' I have made 3 new skills!

Made a new battleback this week! How's it look?
"This is the real secret to life - To be completely engaged with what you are doing in the here and now. And instead of calling it work, realize it is play."

Forum statistics

Threads
113,815
Messages
1,077,677
Members
147,869
Latest member
asdfd
Top