Archived

This topic is now archived and is closed to further replies.

  • 0
Skitzen

Enemy chase on and off maps

Question

Hello all! I am making an rpg horror game on XP. I am trying to get it so when an enemy chase is on, it will follow you (if you touch it it goes to battle or gameover)

when it follows you if you were to go to a different map/room, it follows after you still.

And it only stops following you after you have entered/exited a certain amount of rooms.

Ex:

Character goes into room of house, opens a chest or puts in a passcode to something. chase music starts as enemy pops up.

character runs out of room, enemy appears behind after a few seconds. character runs downstairs, enemy follows still appearing again behind after a few seconds.

character runs back upstairs and back to room, avoids enemy and runs out of room. Enemy stops chase.

I know how to use common events and Variables.. And a friend told me to use the Mapy (ID) and Mapx(ID) but I am not sure how to use that.

Please help guys! I have looked everywhere >.<

For a good example. Anyone play Ao oni? if not go here to see it:

Share this post


Link to post
Share on other sites

21 answers to this question

While I don't use XP, I know that in all editors, events do not transfer over to maps.

So you'll have to create this monster event on every single map the player can go to, that the monster can chase in. I have a similar sort of system set up, where a NPC follows the player in every map, and I have created the NPC event on every single map. When the player enters the map, this event will go on autorun, store the player's Map X and Y coordinates in a variable, then use the set event location using these to variables to put the event at the player.

Of course, you need to understand switches and autoruns before you can pull this off.

Jaide and Skitzen like this

Share this post


Link to post
Share on other sites

You could do it much, much easier with a script, which wouldn't require any switches or events. It's actually easier since you're using XP; SephirothSpawn created a script to spawn events which (to my knowledge) hasn't been ported to RGSS2/3. If you leverage that, you could easily pull this off.

Share this post


Link to post
Share on other sites

While I don't use XP, I know that in all editors, events do not transfer over to maps.

So you'll have to create this monster event on every single map the player can go to, that the monster can chase in. I have a similar sort of system set up, where a NPC follows the player in every map, and I have created the NPC event on every single map. When the player enters the map, this event will go on autorun, store the player's Map X and Y coordinates in a variable, then use the set event location using these to variables to put the event at the player.

Of course, you need to understand switches and autoruns before you can pull this off.

Yeah I understand switches and autoruns. I have tried to set it up multiple times using this way. But the enemy just appears in the corner not moving instead of behind the character after you go to a different map.

Share this post


Link to post
Share on other sites

Hmm, try a parallel process then, for setting the event near the player. Don't forget to turn this off (an erase event would be useful here).

Share this post


Link to post
Share on other sites

Hmm, try a parallel process then, for setting the event near the player. Don't forget to turn this off (an erase event would be useful here).

sadly that's what I have for it. but when it chases me off the map and say I come back to that one while still being chased, it's bugged and it still glitches out.

Share this post


Link to post
Share on other sites

skitzen, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.

Alright, you've got some weird things going on in your event. When does switch Chase turn on? Not only is this switch needed to get the event working, in the third event page .. you turn it on again, for some reason, which it already should have been.

Anyways, let's try to clean this event up:

1st event page: set to parallel process (with switch Chase being on as a condition). Set variable 3 and 4 to the player's map X and Y (there is no need to set them to 0 before hand). Right below it, you set the event's location using these variables. Turn on self switch A.

2nd event page: This will be your 'monster following' event page, which has Self switch A is ON as a condition to start it. Use the battle processing and turn off self switch A as well as the switch 'Chase'.

That should do it. All you need to do is turn on switch Chase to get this thing working, and then copy this event in all maps the monster can follow the player. Also, you should not use a custom route, you should use the 'Approach' option.

Share this post


Link to post
Share on other sites

skitzen, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.

Alright, you've got some weird things going on in your event. When does switch Chase turn on? Not only is this switch needed to get the event working, in the third event page .. you turn it on again, for some reason, which it already should have been.

Anyways, let's try to clean this event up:

1st event page: set to parallel process (with switch Chase being on as a condition). Set variable 3 and 4 to the player's map X and Y (there is no need to set them to 0 before hand). Right below it, you set the event's location using these variables. Turn on self switch A.

2nd event page: This will be your 'monster following' event page, which has Self switch A is ON as a condition to start it. Use the battle processing and turn off self switch A as well as the switch 'Chase'.

That should do it. All you need to do is turn on switch Chase to get this thing working, and then copy this event in all maps the monster can follow the player. Also, you should not use a custom route, you should use the 'Approach' option.

Awesome I will try that thanks! The chase switch was for the event that triggers the monster to start chasing you.

As for the double posting I am sorry my computers internet was being weird and it glitched. XD

I will post back with results of how it turned out. >w< thanks~!

Share this post


Link to post
Share on other sites

Alright, if anything goes wrong, screenshots will be helpful again. :)

Ya it didn't work

Monster appears on other side of the map from me. and is stuck in a wall. So I tried flipping the x and y around.

Now it appears in front of me. I'm no noob at rmxp but the way I had it worked for the chasing but not for the following onto different maps, and after a battle it follows again. And if you enter a few rooms (let's say 5 for the first chase) it dissapears and stops chasing you.

Share this post


Link to post
Share on other sites

Screenshots please, I don't know what you've done wrong without it :D

this is what keeps happening. And I don't want the monster to disappear after you kill it. I want it to wait a few seconds then chase you again.

screenshot of problem

http://s1269.photobucket.com/albums/jj597/Skitzen/?action=view&current=problem1.png

event page

http://s1269.photobucket.com/albums/jj597/Skitzen/?action=view&current=problem1eventpage1.png

event page2

http://s1269.photobucket.com/albums/jj597/Skitzen/?action=view&current=problem1eventpage2.png

Share this post


Link to post
Share on other sites

You are setting both variable 3 and 4 at the same time as X and Y, overwriting the previous setting.

Set variable 3 to X. Set variable 4 to Y. Don't use the 'batch' here.

Try again :)

And if you don't want it to disappear after you're done, simply turn self switch B on after the battle, create a new event page with this self switch. Set it on parallel process, add a wait command for how long you want it to wait, then turn off self switch B.

Share this post


Link to post
Share on other sites

You are setting both variable 3 and 4 at the same time as X and Y, overwriting the previous setting.

Set variable 3 to X. Set variable 4 to Y. Don't use the 'batch' here.

Try again :)

And if you don't want it to disappear after you're done, simply turn self switch B on after the battle, create a new event page with this self switch. Set it on parallel process, add a wait command for how long you want it to wait, then turn off self switch B.

I tried that. After I kill it. it appears a far ways away and if I leave the room it goes back to this:

http://s1269.photobucket.com/albums/jj597/Skitzen/?action=view&current=problem1eventpage2.png

Share this post


Link to post
Share on other sites

Alright, you'll need a new switch then. Call it 'Place Monster' or whatever. Either way, when you turn on switch Chase for the first time, turn on this switch as well. The last event page should have both switch Chase and Place Monster set as a condition to run, set it on parallel process. Do whatever you had in the first event page in this event page to set the variables etc. also turn off self switch A.

Do not turn on a self switch in this event page (you should turn off self switch A though). Instead, turn off switch Place Monster.

The actual first event page will be set to the switch Chase only, and it will chase the player around and have the battle processing in it. Turn on self switch A afterwards. The second event page will have its condition set to self switch A, and have the wait command (set to parallel process), and turn off self switch A.

Now, to get this thing to work, you will have to add a conditional branch in every single transfer player event that checks if switch Chase is on. If it is, turn on switch Place Monster as well. This makes sure it'll set the monster near the player if they enter the map for the first time.

Share this post


Link to post
Share on other sites

Alright, you'll need a new switch then. Call it 'Place Monster' or whatever. Either way, when you turn on switch Chase for the first time, turn on this switch as well. The last event page should have both switch Chase and Place Monster set as a condition to run, set it on parallel process. Do whatever you had in the first event page in this event page to set the variables etc. also turn off self switch A.

Do not turn on a self switch in this event page (you should turn off self switch A though). Instead, turn off switch Place Monster.

The actual first event page will be set to the switch Chase only, and it will chase the player around and have the battle processing in it. Turn on self switch A afterwards. The second event page will have its condition set to self switch A, and have the wait command (set to parallel process), and turn off self switch A.

Now, to get this thing to work, you will have to add a conditional branch in every single transfer player event that checks if switch Chase is on. If it is, turn on switch Place Monster as well. This makes sure it'll set the monster near the player if they enter the map for the first time.

:/ Sadly it's hard to understand >.<

Share this post


Link to post
Share on other sites

Welp ... here we go (bear with me, I'm using VX, not XP).

Monster event:

eventmonster01.png

eventmonster02.png

eventmonster03.png

Transfer event:

eventmonster04.png

This should work. Put the monster event in all maps the monster can follow you in, and add that conditional branch in all transfer events.

Share this post


Link to post
Share on other sites

Welp ... here we go (bear with me, I'm using VX, not XP).

Monster event:

eventmonster01.png

eventmonster02.png

eventmonster03.png

Transfer event:

eventmonster04.png

This should work. Put the monster event in all maps the monster can follow you in, and add that conditional branch in all transfer events.

Omg you are so awesome! Sorry for the trouble! This works amazingly! Thank you so much!

*hug*

Share this post


Link to post
Share on other sites

Hehe, I hope you've learned from this!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.