Changing Landscape W/ Switch or Event

Status
Not open for further replies.

WNxTyr4el

Veteran
Veteran
Joined
Aug 10, 2013
Messages
322
Reaction score
15
First Language
English
Primarily Uses
So I'm at the time in my game where I want to try some different things.  I remember in old games I used to play that if the player pushed a button or something, the landscape would change and open a door or something like that.  That's basically what I want.  I want the player to have to push a button or a series of buttons in order (maybe too complicated for me right now) and when they do a door opens up.

The map I'm using is just the Sample Map "Waterfall" and I want the landscape to change in the middle of the waterfall where a door opens up.  Anyone know how this would be accomplished?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Tsukihime's tile swap does exactly this, and she even uses changing tiles in water (okay, it's a pool, not a waterfall, but you get the point) in one of her examples..  You can find it here

http://forums.rpgmakerweb.com/index.php?/topic/2879-tile-swap/?hl=%2Btile+%2Bswap

An alternative approach would be to have a 2 page event.

Page one - put a graphic of a waterfall tile.  You can't select an autotile as an event graphic.  You will have to copy/paste on onto one of your B-E tile sheets using whatever image manipulation program you use (Photoshop, GIMP, Paint, whatever) and select it from there.

Page two - have a condition Switch [name] ON

The graphic here would be your door, with the passibility 'Player Touch' and the usual transfer commands on the right.

EDIT

Forgot to say for the sake of completeness

Your button will turn switch [name] on when pushed.
 
Last edited by a moderator:

WNxTyr4el

Veteran
Veteran
Joined
Aug 10, 2013
Messages
322
Reaction score
15
First Language
English
Primarily Uses
Tsukihime's tile swap does exactly this, and she even uses changing tiles in water (okay, it's a pool, not a waterfall, but you get the point) in one of her examples..  You can find it here

http://forums.rpgmakerweb.com/index.php?/topic/2879-tile-swap/?hl=%2Btile+%2Bswap

An alternative approach would be to have a 2 page event.

Page one - put a graphic of a waterfall tile.  You can't select an autotile as an event graphic.  You will have to copy/paste on onto one of your B-E tile sheets using whatever image manipulation program you use (Photoshop, GIMP, Paint, whatever) and select it from there.

Page two - have a condition Switch [name] ON

The graphic here would be your door, with the passibility 'Player Touch' and the usual transfer commands on the right.

EDIT

Forgot to say for the sake of completeness

Your button will turn switch [name] on when pushed.
I like the script idea.  I should learn how to use those to make the game more advanced.  Now my question is.  What are the "layer' and "map_id" properties?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
map_id is the map number that you can see bottom right of the editor screen e.g. 002, 015, 121.  You ignore those leading zeros, so it's 2, 15, 121.  However, if you are using it on the map where you want the tile swap to happen, then you don't need to input that.  The layer: Ace only has 2 layers of tiles (unlike XP which has 3) i.e. you can put down a tile from tab A, and that is layer one.  On top of it you can put another tile e.g. a tree.  That is layer 2.  So that bit of the instruction is telling the script whether it's a layer one or a layer two tile.

This is a very easy script to use.  I'm not very advanced with scripts (this is putting it very politely) and I have had no trouble using it.  There are just 2 things to be careful about.

1) Make sure you count accurately when working out which tile is to be the the replacement one.

2) There are 2 ways to spell swap.  The US one (at least I think it's US English) which is swap and is used in this script and the UK spelling which is swop.  Being a Brit I used the UK one and was tearing my hair out trying to discover why the script wasn't working.  I think it took me nearly an  hour to spot what I had done.
 
Last edited by a moderator:

WNxTyr4el

Veteran
Veteran
Joined
Aug 10, 2013
Messages
322
Reaction score
15
First Language
English
Primarily Uses
I'm getting undefined pos_swap.  I guess it's telling me it's not a real script?  I'm not sure.  I'm not good with this type of stuff but I'd really like this to work.  Let me paste what I have.

pos_swap(18, 16, "B68", 2, 11)

That's what I have so far.  

The location I have for the swap is 18, 16 and the tile I want to replace is a waterfall tile with B68 on layer 2 (i think) and the map is #11

EDIT: I had the wrong tile number for what I wanted.  It's actually 72, but I'm still getting a NoMethodError

EDIT: And it's not map #11 lol.  I was looking at the Event #.  My bad.  But you said I don't need that anyway.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
where did you place the script and where did you place the command pos_swap?

undefined usually means that either you haven't installed the script correctly, or that you are using the command at a place where it can't work correctly.

Please post a screenshot of the event with the command if possible, and describe where in the script editor you placed the script.
 

WNxTyr4el

Veteran
Veteran
Joined
Aug 10, 2013
Messages
322
Reaction score
15
First Language
English
Primarily Uses
where did you place the script and where did you place the command pos_swap?

undefined usually means that either you haven't installed the script correctly, or that you are using the command at a place where it can't work correctly.

Please post a screenshot of the event with the command if possible, and describe where in the script editor you placed the script.
LOL!  D'oh!  I forgot to add it to the script editor!  Let me try that and see if it works.

EDIT: Okay jk, Idk where to put the script or how to put it into the Script Editor.

EDIT: GOT IT!
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
If you look at the script you will see that it has excellent instructions on how to use it, starting at line 42.  It's really easy to follow.  And no, you don't need the map ID if the event where you are doing the script call is on the map where you want the tile to be swopped.
 

WNxTyr4el

Veteran
Veteran
Joined
Aug 10, 2013
Messages
322
Reaction score
15
First Language
English
Primarily Uses
If you look at the script you will see that it has excellent instructions on how to use it, starting at line 42.  It's really easy to follow.  And no, you don't need the map ID if the event where you are doing the script call is on the map where you want the tile to be swopped.
Yeah, I figured it out.  Thanks.  It wasn't hard.  I had it right I just had to put the whole script into the script editor.  I forgot about that part and that there was a master script list to tell the game what scrips to use.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
Guessing this is solved then.


For the door underneath the waterfall you'd require a graphical resource, which is asked in resource requests.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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,074
Members
137,578
Latest member
JamesLightning
Top