Change graphic only when standing on a certain Region id or something similar?

ZedFox

The Musical Fox
Member
Joined
Oct 14, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I would like to know if it's possible to have a Region ID toggle the use of a specific graphic for the player as long as the player is touching the region, and if so, how do I make it work?

I would like to have my sitting graphic replace the default while on benches, and the same kind of thing while swimming. As soon as the player is no longer on the swimming or bench tiles, I would like the graphic to change back to the default one.

My attempts with parallel processing have succeeded but lag occurs once the player touches the bench. I cannot use the "Erase event" command as I would need the bench to be infinitely usable.

The whole point of using a terrain or region id is so I don't have to place events everywhere I want the graphic to change.

Help would be much appreciated!
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I think this can only be done with a script. I'm on my phone so can't do links but search for Shaz's region event script. You put a region on the tile and it calls up a common event which can use the Change Actor graph. Put a different region on the tiles around the bench or whatever which calls up another common event which changes it back.
 

ZedFox

The Musical Fox
Member
Joined
Oct 14, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I think this can only be done with a script. I'm on my phone so can't do links but search for Shaz's region event script. You put a region on the tile and it calls up a common event which can use the Change Actor graph. Put a different region on the tiles around the bench or whatever which calls up another common event which changes it back.
Thank you for the reply, that script might be what I need.

My only question is:

Is it possible to make it so that as soon as the character has changed to the graphic, it stops trying to change to it? Like a conditional branch in the common event to check the character graphic and then stop trying until touching another region which would change the graphic to a different one?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
The way the common event works is that it is only called when you are standing on a relevant region. If you're not on a region it does nothing at all. So it's not trying to change anything then.
 

ZedFox

The Musical Fox
Member
Joined
Oct 14, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMVXA
The way the common event works is that it is only called when you are standing on a relevant region. If you're not on a region it does nothing at all. So it's not trying to change anything then.
But if you continue walking on the same region which would change the look of your character, it keeps attempting to change it as long as you're on the tile, which can cause lag. Is there a way to make it so that once it changes the graphic once, it doesn't try to change until going on another region?

Here is an example below:

 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
You'll have to test it for yourself and see. I don't think anyone will do that for you. However, unless you are painting far more tiles with the region id than you actually need, I'd be surprised if there was a problem.

For example, you have a bench - there are only so many adjacent tiles to it that need to be marked in this way, 4 maximum (or 8 if you have enabled diagonal movement as well), and if you plan your object placement carefully, you could frequently reduce that down to just one or two. Even if it were a couple more - how often is the player going to spend their time circling a bench?

I have often had regions which start an effect and another which stops it. The one that stops it is further away from the object. When the player approaches another object with the same set up, they will cross the line of 'stopping' regions first, and there is no noticeable drop in frame rate when they do.
 

ZedFox

The Musical Fox
Member
Joined
Oct 14, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMVXA
You'll have to test it for yourself and see. I don't think anyone will do that for you. However, unless you are painting far more tiles with the region id than you actually need, I'd be surprised if there was a problem.

For example, you have a bench - there are only so many adjacent tiles to it that need to be marked in this way, 4 maximum (or 8 if you have enabled diagonal movement as well), and if you plan your object placement carefully, you could frequently reduce that down to just one or two. Even if it were a couple more - how often is the player going to spend their time circling a bench?

I have often had regions which start an effect and another which stops it. The one that stops it is further away from the object. When the player approaches another object with the same set up, they will cross the line of 'stopping' regions first, and there is no noticeable drop in frame rate when they do.

This mechanic is what I was trying to mimic. I'll try everything I can, but thanks for your help!
 

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,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top