Weird autonomous movement issue

Dissentrix

Veteran
Veteran
Joined
Oct 21, 2014
Messages
44
Reaction score
0
First Language
English
Primarily Uses
Okay so I've got this prison scene set up where you're supposed to run between rows of inmates without getting stopped by the guards. Now I've created an "area effect" to make guards react, move towards you, and stop you when you enter their area. The problem is, they seem to recognize the switch, but then won't move towards the player. And since the "game over" screen only happens when they touch you, well...

1.png

2.png
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Instead of using a parallel process and a self switch, why not set up the page where they chase you to only occur when your switch 26 (guard) is on? That would remove the need for the first page, unless you really want guards standing around that do nothing unless that switch is on.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
First, check if they indeed recognize the switch by giving both pages different sprites.


If the second page sprite does not appear, then you have a problem with the guard switch.


If the second page sprite appears but does not move, then you have a problem with passability.
 

Dissentrix

Veteran
Veteran
Joined
Oct 21, 2014
Messages
44
Reaction score
0
First Language
English
Primarily Uses
@bgillisp Thanks, but I actually do want those guards standing around.

@Andar I did your method, and indeed, it seems they couldn't pass through the barrier of events I created. However now, I have the problem of actually making them touch the player. If I check "through", they don't touch him.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
@bgillisp Thanks, but I actually do want those guards standing around.
Then put it on page two instead with that check, and page one shows with no switch on. That avoids the parallel process. After all, if you have many of them the game will lag, so best to avoid it when possible.

Also, do you want the guards to just say nothing if the player talks to them? If you do that the first complaint you will get is the guards have no text.

As for the rest...events cannot pass through other events unless you check the through switch, and as you saw, once you do that event touch doesn't seem to work right. You will either need to set the route so that there are no events in the way, or find another method.
 

Dissentrix

Veteran
Veteran
Joined
Oct 21, 2014
Messages
44
Reaction score
0
First Language
English
Primarily Uses
Then put it on page two instead with that check, and page one shows with no switch on. That avoids the parallel process. After all, if you have many of them the game will lag, so best to avoid it when possible.

Also, do you want the guards to just say nothing if the player talks to them? If you do that the first complaint you will get is the guards have no text.

As for the rest...events cannot pass through other events unless you check the through switch, and as you saw, once you do that event touch doesn't seem to work right. You will either need to set the route so that there are no events in the way, or find another method.
Thanks, but what exactly do you mean ? Do you mean to put nothing on page one except the graphic ? That wouldn't trigger anything, though, right ?

It'd be cool if there was a solution to this "through" problem, though.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Thanks, but what exactly do you mean ? Do you mean to put nothing on page one except the graphic ? That wouldn't trigger anything, though, right ?

It'd be cool if there was a solution to this "through" problem, though.
Yes. Page is just the graphic, page two is set to run when your guard switch is on (with all of your current page two settings).

I don't think there is a solution to the through problem, but maybe one of the more experienced members can tell us more?
 

Dissentrix

Veteran
Veteran
Joined
Oct 21, 2014
Messages
44
Reaction score
0
First Language
English
Primarily Uses
Yes. Page is just the graphic, page two is set to run when your guard switch is on (with all of your current page two settings).

I don't think there is a solution to the through problem, but maybe one of the more experienced members can tell us more?
Thanks a lot. It didn't work, but at least you tried.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Unfortunately there is no way an event can pass through another event without the "through" checked on, and that will block player contact because it allows the event to go through everything (including walls).


You'll have to approach this problem from a different direction: What are the events surrounding the guard event? Is there a way to replace their function?


In most cases where the user tries to plaster the map with many events, I found that a carefully designed common event can replace those dozen events on the map - especially if they all have the same function.
 

Dissentrix

Veteran
Veteran
Joined
Oct 21, 2014
Messages
44
Reaction score
0
First Language
English
Primarily Uses
Unfortunately there is no way an event can pass through another event without the "through" checked on, and that will block player contact because it allows the event to go through everything (including walls).

You'll have to approach this problem from a different direction: What are the events surrounding the guard event? Is there a way to replace their function?

In most cases where the user tries to plaster the map with many events, I found that a carefully designed common event can replace those dozen events on the map - especially if they all have the same function.
Thanks for your reply. Here are some screenshots of one of the (many) events surrounding my guard. They indeed all have the same function, but they're activated by player contact.

3.png

4.png
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
please don't quote the entire post you're answering to. Especially if the post is directly above, no quote is required - and if you want to answer to a specific point, then delete everything but that point from the quote


As for your events - those are in fact perfect to be replaced by common events of a certain structure.


Basically you make an parallel process common event that is activated on that map only.


In that event, you'll begin by setting two variables with control variables to player map X and player map Y - that is the current position of the player.


In the next step, you use conditional branches (and perhaps more control variable commands) to check if the player position is in one of the triggering areas. If yes, you activate the switch - if not do nothing.


The last step should be a wait(10) or so to prevent the CE from creating lag.


Depending on how you want to handle it and what the exact positions for the triggers are, there are several ways how to calculate or set the triggering areas for the common event, but you don't need a single map event for that function.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
If I see those events correctly, it looks like you want the guards to start chasing you only when you get so close. If that is the case, there is a script for that too, Yanfly's event chase player. It will have the guards chase when you are so close and stop chasing once you are far enough away.
 

Dissentrix

Veteran
Veteran
Joined
Oct 21, 2014
Messages
44
Reaction score
0
First Language
English
Primarily Uses
@Andar

All right, this is the common event I came up with ("the other cell" being a switch that turns on at the beginning of the map). Yet it still doesn't work. Am I getting the coordinates wrong ? Or maybe something in the guard's event ?

@bgillisp

I wish I could use those scripts, but I'm using RMVX. Do they work on it ?

5.png

6.png

7.png
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Yet it still doesn't work. Am I getting the coordinates wrong?
You don't have the coordinates, because you forgot the commands of the first part I mentioned, before any conditional branch.
The first two commands need to be two control variable commands to set the current values for the two variables, only after that (as the third command) comes the first of your conditional branches.


It might be easier to work with "greater than" instead of "equal" in the conditional branches, but that requires a bit more math even if it speeds up the event - your decision, as soon as you add the control variable commands in the beginning even your event should work.
 
Last edited by a moderator:

Dissentrix

Veteran
Veteran
Joined
Oct 21, 2014
Messages
44
Reaction score
0
First Language
English
Primarily Uses
Still doesn't work, even after I do this. What am I doing wrong ? If it's the coordinates, I still don't know what comes first on the map, X or Y. If it's something to do with the switch at the beginning, I've tested another switch on the same page and it works fine.

EDIT : Nvm, I figured it out  :D Turns out the Y is actually the second coordinate. Thanks everybody, it seems my problem is solved.

8.png
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top