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?
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.
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.
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.
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.