on map enemies\events

ok so my brain decided to shutdown all operations apart from breathing and i cant think properly ...and i have a few questions on mapped enemies =\


1- how can i event it such as if enemy passes THROUGH player, player gets damage and become invincible for a while ??


how i approached it was event touch but that damages you if you are surrounding the event ...i want it like ..if player and event on same tile..i know it has to be related to return value to variable about location on map but i cant seem to get it right.


and once you get damaged i placed a wait on the event that damaged you so it doesn't cause another damage but this causes event and player to freeze...


2-is there a way to make an event generate enemies periodically??? like ...a sewer hole keeps throwing out slime every X time


i want it in a way such as...if you don't defeat first slime another will still come out, and another ...untill they reach a random number


i tried making it with variables but failed miserably. X. X


i guess thats about it ... need eventing help with those issues. 😀
1) put a conditional branch in the event that checks for event x and to match player x and y, if both are equal then change hp by the amount you want.  Also you would need to activate a switch and on the second page have it wait for X amount of frames then turn the switch off.


2)you would either need to have the events invisible to the player and move/change sprite to the sewer hole or I believe there is a copy event plugin that would copy an event you use as a base and could copy the number you wanted.
Also you would need to activate a switch and on the second page have it wait for X amount of frames then turn the switch off.

thanks!! ok this solved the waiting problem ...as for the rest i really feel like im reading chinese for some reason, ill get some sleep and try to understand it later i guess x,x


ok about the second issue, isnt there a way t make one event spawn as much monsters as needed insted of having 1312312 events?
Like Dalamar said, without a plugin, you'll need a separate event for each monster, since on-map enemies must be treated individually instead of a random troop battle. Depending on how ridiculous a number of enemies you wanted, this shouldn't be too bad. Just make a small army of invisible events off in the corner somewhere, with a variable controlling their spawning. When the variable ticks up, have an event page teleport one of those events to the sewer hole and turn off transparency or switch event pages, whichever you prefer. If you need help setting this up specifically, I can try to set up a test run and help you get it down.


And sorry I can't really help you with the first issue. Looked in the conditional branches and didn't really see anything about player coordinates that I knew how to use. *shrug*
yea but imagine wanting to have infinite spawning untill certain condition is met ...not enough events will cover this up 😛 ....


unless somehow i can use one event in multiple locations? like sent event X into places X Y Z , that would be great @.@
@Ugouka control variables->game data(you would need 2 variables for the player and 2 variables for each event on the map) or you can do it with a script call.


@Balako spawning events infinitely until a condition(s) is met would probably cause lag and unless you were very good at giving the player a way to clear multiple events at a time probably player frustration too


1a)I would make it so that the switch activates a common event to take care of the wait time so you don't have a bunch of parallel process events on screen at once.  Also it would make it easier to make sure the player isn't getting hit by mob event after event leading to a 1 hit and the throwback/damage kills you from not being able to act.
script call sounds a whole less taxing than variables for this, i guess there is no escaping a few java tutorials now ...
Like Dalamar said, without a plugin, you'll need a separate event for each monster, since on-map enemies must be treated individually instead of a random troop battle. Depending on how ridiculous a number of enemies you wanted, this shouldn't be too bad. Just make a small army of invisible events off in the corner somewhere, with a variable controlling their spawning. When the variable ticks up, have an event page teleport one of those events to the sewer hole and turn off transparency or switch event pages, whichever you prefer. If you need help setting this up specifically, I can try to set up a test run and help you get it down.


And sorry I can't really help you with the first issue. Looked in the conditional branches and didn't really see anything about player coordinates that I knew how to use. *shrug*





Create an event with a parallel trigger..


Create 2 variables.  Call one player x and the other player y


Assign a variable -  player x.


On your event page do a "control variables".
    single (assign to player x)
    operation:  set
    game data:  map x of player


Make another variable for player y.


Do the same procedure (as above) but assign to player y and use map y of player.


Now you have two variables that will always have player x and player y values assigned to them.


If you only care about events next to your player then you can assign 4 more variables -> one for each square next to the player.  Then you can check those tiles for an event ID and if there is none then there is no event next to the player.  If there is one, then you have an event ID and from that you can tell what monster is nearby.

Original thread: https://forums.rpgmakerweb.com/threads/on-map-enemies-events.59732/