I'm adding monsters on the main map that can attack players but am not sure how to make them deal damage. They also go off in a crazy direction. Any help would be appreciated.
Need help with monsters on maps attacking players.
RPG Maker VXAce Supportyou should post a screenshot of an example of what you have, because there are several different ways to do this and we can't help without details.
and damage could either be done through the battle processing command, or through the change HP command for actors.
and damage could either be done through the battle processing command, or through the change HP command for actors.
What I'm going for is that a monster event is patroling in a pattern and when they hit a player or a player runs into them that player takes a certain amount of damage once. Then the enemy continues on its patrol pattern. The player will continue to take damage one time each time they are hit.
I can think of a bunch of different ways to do this - mostly with parallel processing on an event to process regions on the map + event positions. How are you currently trying to do this?
when I ask for a screenshot, I'm looking for a screenhot of the event pages to see what commands and settings you have - a map screenshot is almost always worthless in such a case.
and I already told you to use change HP on the actor(s) to do the damage.
as for the movement problem I can still only guess because you still haven't told us how you move, but if you made the move with autonomous movement that resets on event trigger.
and I already told you to use change HP on the actor(s) to do the damage.
as for the movement problem I can still only guess because you still haven't told us how you move, but if you made the move with autonomous movement that resets on event trigger.
Make an event with Custom move route under autonomous movement. trigger event touch. under contents, change hp.
I just had a custom move route with a 'hit' sound effect, a screen flash, and a message pop up. But this event just added a 'poison' state instead of damage. Since this was for another type of enemy. One problem I still have is the enemy seems to just fly off in a random direction after hitting my character or vice versa.
Why that extra move route in the Contents section? And, to prevent the move route from getting at all disrupted, you can check Through on options on bottom left.
of course it does - and no, @ts50 suggestion will NOT help.
actually there are two different reasons for this, both being limits of the move route data.
1) each event can have only one move route at any time. Sending a second move route will erase the previous move route even if it is not complete yet.
so the autonomous moveroute and the set moverout inside the main content will overwrite each other at an unknown moment.
2) a trigger resets the autonomous movement
I already mentioned this above, but after the event touch the autonomous moveroute WILL START AT STEP 1, no matter where it was previously and where the event is currently positioned.
You cannot solve your idea easily, there are only two possible solutions to this:
1) you add a pathfinding script and have the enemy search its way between two or three patrol points.
Main problem is that this will cause a lot of processing if you have a dozen enemies on a map, but on the other hand modern computers have processing power to spare.
2) a parallel process handles movement and damage from outside the event, so that it does not need to reset. This will also require some processing and a much more complex event, but will work without a script
The custom move route is when it is patrolling. The event page one is when it hits the player. It will hit the character and instead of getting stuck after hitting a solid object (the character), it will switch to 'through on' and pass through the character by moving 'step forward' twice then switch 'through off' before continuing on its normal patrol path. Until it hits the character again (if they are still in the way) and repeats. If I click the 'through on' in the bottom left then it will pass through the character. Instead of hitting them.
that will never happen, no matter how much you wish it to be so.
After event touch the move route will be restarted from step 1, no matter the current position of the event on the patrol route.
Example: Event starts and goes its seven steps down, turns up, goes one step up and hits the player.
It poisons the party and then goes two steps through it. It is now three steps up from the button, still four steps down from the starting point.
AND NOW THE ROUTE RESTARTS after the event trigger is handled!!!
The next command is turn down, followed by seven step down - if the player is alredy out of the way by that time, otherwise its even worse.
So now the patrol route has changed to one that is four steps down from the original one, from position 4 to 11 down and back compared to the original (if the map has that space, otherwise the skip if cannot move might correct the position a bit)
Rpg maker source has an excellent pathfinding script
the easiest way is to have a pathfinding script target the two coordinates that define the endpoints of the patrol route.
a good pathfinding plugin can find any path, it should not be limited to target the party.
the other way is to have the moveroute come from a different event that cannot be interrupted by the effect. that requires some tricky eventing however that I'm currently not awake enough to sort out.
So any updates on how to fix the issue?
??
I told you the ways in the post directly above your question - have you tried that?
I told you the ways in the post directly above your question - have you tried that?
I looked over all the pathfinding scripts I could find but nothing in their descriptions mentioned anything close to the problem I am having with enemies being able to hit players and continue on.
Please state what pathfinding script(s) you are using.
because hitting has nothing to do with your problem.
your problem is that the move route resets after the content of the event is executed.
and to solve that you need to change the move route from a dozen fixed commands to one "go to point" command.
Theo - Pathfinding and Event Chase Player
Pathfinding and Event Chase Player Version 1.0b Type : Field script Introduction This script simply for determine the shortest path from started from a character position to target coordinate. Features : Determine the shortest path Chase the player in smarter way Video Preview Download...
forums.rpgmakerweb.com
Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-monsters-on-maps-attacking-players.145232/