The Game of Tag

Lord Pretty Pie

The Lord of Pies
Member
Joined
Aug 27, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Hello! I'm quite new to RPG Maker, but I've been having a lot of fun with it thus far. The thing is, I've been trying to implement a simple game of tag into my game.

What I've done is make an event with the graphic of the character you talk to, who asks "Would you like to play tag?"

Answering with 'Yes' moves you one step away from the event, then turns on a switch I named 'Play Tag: It'.

The next page of the event is set to 'Approach' and to activate on 'event touch', which works quite well. Once caught, the event say's "Tag, You're it!",

then turns a switch I named 'Play Tag: Not It' on, then turning 'Play Tag: It' off again, and thus moving to the next page.

Here's where I'm having trouble. Now that you're it, rather than the event, I'm having difficulty making it flee. There is no movement option for 'Move away from Player', sadly, so I set it to custom, then put 'Move Away from Character' there. They do move away, but only in a straight line, then stopping at the far wall, or other obstruction if one exists.

SO. Here is my quandary: How do I make the event better flee from the player?

Any and all suggestions are greatly appreciated!

Edit: Oh yeah, and It's on RPG Maker VX Ace. Uh. I think I posted it in the wrong section though... Oh well, someone will figure it out.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You're not looking closely enough.


Move Away from Player is 5th command from the bottom, first column.


To stop them going in a straight line all the time, you could do 3 or 4 Move Away from Player commands, followed by a Move Random command. Of course, that could make them move TOWARDS the player every 5th step.
 

Lord Pretty Pie

The Lord of Pies
Member
Joined
Aug 27, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
You're not looking closely enough.

Move Away from Player is 5th command from the bottom, first column.

To stop them going in a straight line all the time, you could do 3 or 4 Move Away from Player commands, followed by a Move Random command. Of course, that could make them move TOWARDS the player every 5th step.
Thanks for the suggestion, I did consider that, but it's not quite what I'm after.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Thanks for the suggestion, I did consider that, but it's not quite what I'm after.
So how do you want the event to flee?

You can do a lot (especially if you add scripts for event controls), but it basically comes down to a choice between an automated "move away" which is basically random, or a fixed move route that depends on map position (and might break if the move goes into a wall).

You can use conditions to split and change between different parts of a move route (and create some really good simulation of movement by clever choosing the changing definitions), but that's about it.

Please give us a better description and tell us what you didn't like on the "move away" solution, then we can help you better.
 

Lord Pretty Pie

The Lord of Pies
Member
Joined
Aug 27, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
So how do you want the event to flee?

You can do a lot (especially if you add scripts for event controls), but it basically comes down to a choice between an automated "move away" which is basically random, or a fixed move route that depends on map position (and might break if the move goes into a wall).

You can use conditions to split and change between different parts of a move route (and create some really good simulation of movement by clever choosing the changing definitions), but that's about it.

Please give us a better description and tell us what you didn't like on the "move away" solution, then we can help you better.
Ah.

The problem with the previous suggestion is, I already had the 'move away' command, but it's just too... simple. They go in a straight line till they hit a wall, then basically give up. Throwing in a random move or two won't help, because by doing so they could very well move toward the player, which doesn't help, but it also would only be every few steps, the rest of witch it still uses to rub it's face up against a wall, and will likely have been caught before given another chance to move in a possibly not-helping-at-all direction.

See, when the event is set to move toward a character, it seems to realize when it's hit a wall, and will try to find a new route, at least to some extent.

I'd really like for them not to give up while running away, just because they hit a wall. What fun is a game of tag when the person you're chasing just stops trying?

What I need is some way to make it, as you said, a basically random automated move away, one where they don't go in a straight line then stop, but rather forge a path to get literally as far away as possible, without trapping themself.
 

Laptopdancer

Gaymerz Rock!
Veteran
Joined
Oct 22, 2012
Messages
158
Reaction score
20
First Language
English
Primarily Uses
I'm not sure if you want your hide and seek activated by speaking to the character or not, which is how I did it in my project... If so then what about making the NPC's event to start the game with whatever text "hey wanna play a game wif me?",  and then choices "sure I'll play" or "Get lost kid, I don't have time for this" etc. Next if yes choice: calling set move route of (event #) so the NPC runs off screen, And then using randomized value in a variable you might lable Hide and Seek and defining different hiding places on the map with multiple conditional branches defining your value range in the variable eg. if variable is equal to "1" then: (direct map x y designation)  you could use a self switch after agreement to play in a multi page event to designate the "you found me" text and possible rewards when your player touches the NPC in it's new hiding spot... If you want the player to be able to play multiple times upon finding the NPC in it's hiding spot then in the second event page how about shutting off the self switch so next time the player touches the NPC it reverts to "hey wanna play a game wif me?"

What a lot of opinion for a mis-read. I'm super sorry! Ha!
 
Last edited by a moderator:

Lord Pretty Pie

The Lord of Pies
Member
Joined
Aug 27, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
I'm not sure if you want your hide and seek activated by speaking to the character or not, which is how I did it in my project... If so then what about making the NPC's event to start the game with whatever text "hey wanna play a game wif me?",  and then choices "sure I'll play" or "Get lost kid, I don't have time for this" etc. Next if yes choice: calling set move route of (event #) so the NPC runs off screen, And then using randomized value in a variable you might lable Hide and Seek and defining different hiding places on the map with multiple conditional branches defining your value range in the variable eg. if variable is equal to "1" then: (direct map x y designation)  you could use a self switch after agreement to play in a multi page event to designate the "you found me" text and possible rewards when your player touches the NPC in it's new hiding spot... If you want the player to be able to play multiple times upon finding the NPC in it's hiding spot then in the second event page how about shutting off the self switch so next time the player touches the NPC it reverts to "hey wanna play a game wif me?"
Thanks for trying to help, but I was actually asking about Tag, not Hide and Seek. Though, now that you mention it, that's also pretty cool. I might do that too, but I still need help with Tag.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
What you're asking for is actually quite complicated. You're basically asking for AI regarding pathfinding - and some commercial games can't even do that right.


There might be some (working) pathfinding scripts available, so try looking at the master script list (in our script section, it's stickied.)


Also, I'd like to note that the event doesn't chase the player any better than he runs away from it. It changes its trajectory anytime the player moves. So if it's stuck behind a wall, and you don't move, it won't either.
 
Last edited by a moderator:

Lord Pretty Pie

The Lord of Pies
Member
Joined
Aug 27, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
What you're asking for is actually quite complicated. You're basically asking for AI regarding pathfinding - and some commercial games can't even do that right.

There might be some (working) pathfinding scripts available, so try looking at the master script list (in our script section, it's stickied.)

Also, I'd like to note that the event doesn't chase the player any better than he runs away from it. It changes its trajectory anytime the player moves. So if it's stuck behind a wall, and you don't move, it won't either.
Alright, I'll try that. Thanks! Though, about your note, It does chase the player a lot better than it flees. I'm new to RPG maker, and you obviously know a lot more about it than I do, but it really can't be argued.

While standing still, if the event is chasing you, it doesn't just sit at the wall. I'm not saying it will necessarily find a way around the wall, but it will move around a bit still, though usually to one side, then back up against the wall again. When fleeing, however, once it hits a wall, it stops. Period. Sure, it'll move to one side if you move in the opposite direction, but once in a corner, it is literally incapable of going anywhere else. As far as the complexity of it's coding, I'm sure approach and evade are on the same level, but clearly the move away needs to be more advanced in coding for it to be equal when applied.

Then again, what the hell do I know. I'm just some kid who decided to make a game cuz' he's bored.
 
Last edited by a moderator:

Luigi-like

That guy you know
Veteran
Joined
Aug 4, 2013
Messages
64
Reaction score
1
First Language
English
Primarily Uses
Then again, what the hell do I know. I'm just some kid who decided to make a game cuz' he's bored.
This is a bit off topic sorry, but iv'e been there and done that too many times  :headshake:  not rpg maker alone... it's sad being a gamer you waste your life collecting new ones but where does your real one go? (someone give me a medal i just made a good quote!)

Back to topic I agree with your whole fleeing mechanic theory, it's just making the guy (or girl) look like a ******, just running into a wall and giving up COMPLETELY is just annoying...

Edit: and setting a custom move route works but players catch on quick to that stuff...
 
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,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top