Event chasing characters

Hierophant

Veteran
Veteran
Joined
Jul 8, 2012
Messages
122
Reaction score
1
First Language
French/English
Primarily Uses
Is there a maximum range for events chasing characters? I have an event set up on a repeating loop of "move towards players" and it behaves just fine until I outwalk it off the screen... in which case it seems to just stop moving. When I come back within viewing range it starts moving again.

I am making an event where a ghost pursues you everywhere on the screen until you find its vessel and destroy it... so having the ghost stay behind while you go all over the level is a little underdramatic.
 

Necromus

Veteran
Veteran
Joined
Mar 14, 2012
Messages
490
Reaction score
61
First Language
German
Primarily Uses
No need for a looping move route like that. There should be a move towards player command and you can set the movement to repeat, especialy when its a parallel process event, like your ghost should be now ;)

So it's just a single command for the whole movement in the end.
 

Hierophant

Veteran
Veteran
Joined
Jul 8, 2012
Messages
122
Reaction score
1
First Language
French/English
Primarily Uses
Oh, I think I misunderstood you about the parallel process. I thought you wanted me to create a new event and run it as a parallel process. I see now. I put everything in the ghost event and it still works fine.

I did not want to use the Approach because it behaves more erratically than looping a move towards player command. But either way, I tried that too and it still did the same thing. It stops moving as soon as it's out of visual range.

Well, not RIGHT out of visual range, but a bit more away.
 
Last edited by a moderator:

Necromus

Veteran
Veteran
Joined
Mar 14, 2012
Messages
490
Reaction score
61
First Language
German
Primarily Uses
Oh yea i ment the ghost it self, but both works.

Well seems as if alot of events imply wont get updated once they are off screen, makes sense, since it would be mostly uneeded traffic.

Out of my head i don't think you can prevent hat without scripting, but maybe someone else comes up with something.
 

Hierophant

Veteran
Veteran
Joined
Jul 8, 2012
Messages
122
Reaction score
1
First Language
French/English
Primarily Uses
Huh. Maybe measure the distance between player and ghost in the event and if they are too far away, teleport the ghost closer? I dunno... That's the only thing I can come up with right now.
 

Necromus

Veteran
Veteran
Joined
Mar 14, 2012
Messages
490
Reaction score
61
First Language
German
Primarily Uses
That's not too bad of an idea actually.

You can just use the coordinates from before to measure that.

By default the the part you actuallly see of the map is 17 x 13 tiles. So you would need to start porting the ghost once it's X position is either (17-1)/2 = 8 bigger or smaller than the hero's X position, or when the Y position is (13-1)/2 = 6 bigger or smaller than the hero's Y position.
 

Hierophant

Veteran
Veteran
Joined
Jul 8, 2012
Messages
122
Reaction score
1
First Language
French/English
Primarily Uses
Is there any way I could have the ghost still move when out of range? Like, make it move manually by manipulating its coordinates? I don't see how to maintain the speed and frequency, though...

Maybe some kind of compromise... having the ghost remain just out of range, or something like that.
 

Necromus

Veteran
Veteran
Joined
Mar 14, 2012
Messages
490
Reaction score
61
First Language
German
Primarily Uses
You could increase it's speed once it gets too far away from you (but still inside the boundaries of the screen), with the same way i used above.
 

Hierophant

Veteran
Veteran
Joined
Jul 8, 2012
Messages
122
Reaction score
1
First Language
French/English
Primarily Uses
Yes, that is true. A bit of a cheat gamewise (if the ghost can go that fast, why doesn't he always do it?), but also possible.
 

Necromus

Veteran
Veteran
Joined
Mar 14, 2012
Messages
490
Reaction score
61
First Language
German
Primarily Uses
Cause the ghost is a mean sadist, existing only for the fun of showing he can nag your player at any time possible muahahah!

Er yeah *cough*, that would work :p

Maybe (or rather for sure) there are other ways of doing that, just nothing i can come up with right now.
 

Hierophant

Veteran
Veteran
Joined
Jul 8, 2012
Messages
122
Reaction score
1
First Language
French/English
Primarily Uses
I'll wait and see if anyone else has ideas... otherwise I'll probably try to do some combination of these.
 

celebrus

Veteran
Veteran
Joined
May 2, 2012
Messages
233
Reaction score
2
First Language
English
Primarily Uses
I second this request. I also have an event chasing a character in a large-ish room, but if the character can get out of sight, he can take a nap because the chaser isn't coming...
 

Hierophant

Veteran
Veteran
Joined
Jul 8, 2012
Messages
122
Reaction score
1
First Language
French/English
Primarily Uses
I am only using Victor Script Engine. I do not know if it has anti-lag capabilities.
 
Last edited by a moderator:

Hierophant

Veteran
Veteran
Joined
Jul 8, 2012
Messages
122
Reaction score
1
First Language
French/English
Primarily Uses
All right, here's what I did so far:

In the ghost event, I set variables for Player X, Player Y, Ghost X and Ghost Y.

Then I calculate a variable called Player X - Ghost X and another called Player Y - Ghost Y.

Then I check if Player X - Ghost X < -10 (a number I determined by trial and error based on Necromus' calculation), in which case

I calculate a new variable called Player X + 10, and change event position to (Player X + 10, Ghost Y)

Then I check if Player Y - Ghost Y < -8, in which case

I calculate a new variable called Player Y + 8, and change event position to (Ghost X, Player Y+8)

And same for the other direction, symmetrically.

I set the ghost's speed to speed x8 slowest and frequency highest (simply because I like the visual effect, it's a fluid movement but slow enough).

The net effect of this is that you can lose the ghost quite easily, but once you spend any time in one location (and my floor is made of small rooms, some of which require some deduction to go through, some of which have backtracking), you need to use some footwork to escape the ghost. I think this is satisfactory in terms of tension... although I'll have to test the floor more thoroughly. Celebrus, if you have a more open wide area, I recommend you set the speed higher.
 
Last edited by a moderator:

mike_your_bro

Veteran
Veteran
Joined
Aug 5, 2012
Messages
105
Reaction score
6
First Language
English
Primarily Uses
I am only using Victor Script Engine. I do not know if it has anti-lag capabilities.
It does, check it out HERE

Is there a maximum range for events chasing characters? I have an event set up on a repeating loop of "move towards players" and it behaves just fine until I outwalk it off the screen... in which case it seems to just stop moving. When I come back within viewing range it starts moving again.

I am making an event where a ghost pursues you everywhere on the screen until you find its vessel and destroy it... so having the ghost stay behind while you go all over the level is a little underdramatic.
forgive me if you've already got this working, but i can think of 2 ways:

first way

make the ghost an actor, then when you want it to begin following you just add him to the party and remove him when you find his vessel,

second way

basically the same as the other peeps were saying, but since it's a ghost maybe try turning on 'through' for the event, and when he gets within the certain distance of you (say 3 or 4 blocks) have it turn on a self-switch to activate a page where he just moves randomly instead of 'towards player' and when you two are far enough apart have the self switch turn off.

No need for a looping move route like that. There should be a move towards player command and you can set the movement to repeat, especialy when its a parallel process event, like your ghost should be now ;)

So it's just a single command for the whole movement in the end.
Also, another way would be to set the event's move route not via 'set move route' command but more simply just go to the dropdown above frequency/speed and select 'custom', then just add ONE thing, like Necromus said, just 'move toward player'.

not sure how much better this would be but then you wouldn't even have to have the event running as a parallel process unless you (for some reason) absolutely have to have it running as a move route command instead.

not sure if its what you wanted or not but regardless, thought i'd throw in my 2cents.
 
Last edited by a moderator:

Hierophant

Veteran
Veteran
Joined
Jul 8, 2012
Messages
122
Reaction score
1
First Language
French/English
Primarily Uses
I think my method is pretty good. No one else has reported on it though.
 

mike_your_bro

Veteran
Veteran
Joined
Aug 5, 2012
Messages
105
Reaction score
6
First Language
English
Primarily Uses
All right, here's what I did so far:

In the ghost event, I set variables for Player X, Player Y, Ghost X and Ghost Y.

Then I calculate a variable called Player X - Ghost X and another called Player Y - Ghost Y.

Then I check if Player X - Ghost X < -10 (a number I determined by trial and error based on Necromus' calculation), in which case

I calculate a new variable called Player X + 10, and change event position to (Player X + 10, Ghost Y)

Then I check if Player Y - Ghost Y < -8, in which case

I calculate a new variable called Player Y + 8, and change event position to (Ghost X, Player Y+8)

And same for the other direction, symmetrically.

I set the ghost's speed to speed x8 slowest and frequency highest (simply because I like the visual effect, it's a fluid movement but slow enough).

The net effect of this is that you can lose the ghost quite easily, but once you spend any time in one location (and my floor is made of small rooms, some of which require some deduction to go through, some of which have backtracking), you need to use some footwork to escape the ghost. I think this is satisfactory in terms of tension... although I'll have to test the floor more thoroughly. Celebrus, if you have a more open wide area, I recommend you set the speed higher.
i think this sounds about as perfect as it could really get, and if it serves its purpose, well, why fix what aint broke?

I think my method is pretty good. No one else has reported on it though.
it's good.

see, heres my deal, i have 2 computers, one is offline with no network card, and the other is my netbook.

the netbook works to go online but doesnt run rpg maker due to screen resolution, whereas the desktop with no internet is the one i do my game design on.

so if i'm trying something rpgmaker related i am using my phone to surf the net, and if not im on the netbook, so it is really easy to overlook certain posts. sorry about that, shouldve seen your post before, but nevertheless, if it works it works. all the best to you broseph, if its still buggy, i am no expert, but i will be glad to help how i can.
 

Hierophant

Veteran
Veteran
Joined
Jul 8, 2012
Messages
122
Reaction score
1
First Language
French/English
Primarily Uses
No biggie. I've gotten a lot of help from this board, so I'm glad I may be slightly useful to others.
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top