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.
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.
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.
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.
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.
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.
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.
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.
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.
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 😛
Maybe (or rather for sure) there are other ways of doing that, just nothing i can come up with right now.
I'll wait and see if anyone else has ideas... otherwise I'll probably try to do some combination of these.
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...
Are you using any anti-lag scripts perhaps?
I am only using Victor Script Engine. I do not know if it has anti-lag capabilities.
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 my method is pretty good. No one else has reported on it though.
No biggie. I've gotten a lot of help from this board, so I'm glad I may be slightly useful to others.