Jump to content


Photo

Enemy chase on and off maps

enemy chase axis powers hetalia event variable help xp horror

This topic has been archived. This means that you cannot reply to this topic.
21 replies to this topic

#1 Skitzen

Skitzen

    Advanced Member

  • Early Adopter
  • 32 posts

Posted 22 April 2012 - 10:52 PM

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:

#2 Celianna

Celianna

    VX/Ace tileset artist

  • Global Moderators
  • 6,680 posts

User's Awards

        

Posted 23 April 2012 - 02:58 PM

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.

new_logo_small_zpsae8f2402.png
A new dungeon-themed tileset in the works.


#3 Sailerius

Sailerius

    Engineer

  • Members
  • 307 posts

Posted 23 April 2012 - 06:11 PM

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.

#4 Skitzen

Skitzen

    Advanced Member

  • Early Adopter
  • 32 posts

Posted 24 April 2012 - 10:56 PM

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.

#5 Celianna

Celianna

    VX/Ace tileset artist

  • Global Moderators
  • 6,680 posts

User's Awards

        

Posted 25 April 2012 - 01:56 AM

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).

new_logo_small_zpsae8f2402.png
A new dungeon-themed tileset in the works.


#6 Skitzen

Skitzen

    Advanced Member

  • Early Adopter
  • 32 posts

Posted 25 April 2012 - 03:07 AM

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.

#7 Celianna

Celianna

    VX/Ace tileset artist

  • Global Moderators
  • 6,680 posts

User's Awards

        

Posted 25 April 2012 - 03:36 AM

Can I see some screenshots of the event? This will probably help a lot more :)

new_logo_small_zpsae8f2402.png
A new dungeon-themed tileset in the works.


#8 Skitzen

Skitzen

    Advanced Member

  • Early Adopter
  • 32 posts

Posted 25 April 2012 - 11:22 AM

XD

Edited by skitzen, 25 April 2012 - 12:51 PM.


#9 Skitzen

Skitzen

    Advanced Member

  • Early Adopter
  • 32 posts

Posted 25 April 2012 - 12:50 PM

Can I see some screenshots of the event? This will probably help a lot more :)


This is the event I have for when the player is being chased.
Page1
http://i1269.photobu...itzen/page1.png
Page2
http://i1269.photobu...itzen/page2.png
Page3
http://i1269.photobu...ng?t=1335376130
Page4
http://i1269.photobu...ng?t=1335376120

#10 Celianna

Celianna

    VX/Ace tileset artist

  • Global Moderators
  • 6,680 posts

User's Awards

        

Posted 25 April 2012 - 02:17 PM

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.

new_logo_small_zpsae8f2402.png
A new dungeon-themed tileset in the works.


#11 Skitzen

Skitzen

    Advanced Member

  • Early Adopter
  • 32 posts

Posted 25 April 2012 - 11:41 PM

[dpost]skitzen[/dpost]

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~!

#12 Celianna

Celianna

    VX/Ace tileset artist

  • Global Moderators
  • 6,680 posts

User's Awards

        

Posted 26 April 2012 - 02:03 AM

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

new_logo_small_zpsae8f2402.png
A new dungeon-themed tileset in the works.


#13 Skitzen

Skitzen

    Advanced Member

  • Early Adopter
  • 32 posts

Posted 26 April 2012 - 02:10 AM

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.

#14 Celianna

Celianna

    VX/Ace tileset artist

  • Global Moderators
  • 6,680 posts

User's Awards

        

Posted 26 April 2012 - 01:20 PM

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

new_logo_small_zpsae8f2402.png
A new dungeon-themed tileset in the works.


#15 Skitzen

Skitzen

    Advanced Member

  • Early Adopter
  • 32 posts

Posted 27 April 2012 - 04:05 PM

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.photobu...nt=problem1.png
event page
http://s1269.photobu...1eventpage1.png
event page2
http://s1269.photobu...1eventpage2.png

#16 Celianna

Celianna

    VX/Ace tileset artist

  • Global Moderators
  • 6,680 posts

User's Awards

        

Posted 27 April 2012 - 05:05 PM

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.

new_logo_small_zpsae8f2402.png
A new dungeon-themed tileset in the works.


#17 Skitzen

Skitzen

    Advanced Member

  • Early Adopter
  • 32 posts

Posted 27 April 2012 - 05:24 PM

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.photobu...1eventpage2.png

#18 Celianna

Celianna

    VX/Ace tileset artist

  • Global Moderators
  • 6,680 posts

User's Awards

        

Posted 28 April 2012 - 03:21 AM

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.

new_logo_small_zpsae8f2402.png
A new dungeon-themed tileset in the works.


#19 Skitzen

Skitzen

    Advanced Member

  • Early Adopter
  • 32 posts

Posted 28 April 2012 - 02:07 PM

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 >.<

#20 Celianna

Celianna

    VX/Ace tileset artist

  • Global Moderators
  • 6,680 posts

User's Awards

        

Posted 28 April 2012 - 03:29 PM

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

Monster event:
Spoiler


Transfer event:
Spoiler


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.

new_logo_small_zpsae8f2402.png
A new dungeon-themed tileset in the works.