Ok, heres the deal, I have 2 maps, well I want to say.... make a certain tile, when you step on it, take me to the new map, how do I do this?
Thanks
KnightRen
ID:179727
![]() Nov 17 2001, 3:11 pm
|
|
um ok, can you be a little more specific, on the multiple sets, do you mean I have to type in 3 numbers for each coordinate?, like 3 for x, 3 for y, and 3 for z?
|
You make a new turf that works like this:
turf/certaintile There is also a more efficient way to do this for if you have many stairways, but that might be a bit complex if you're too new. It's also untested by me, so beware. var/list/StairList = list() With this code, every time you place a certaintile on the map, just use the editor to edit the tile and change the stairway var, and whenever you enter the tile, it searches the stairlist for any other tiles in the world that have the same stairway value, and warps you the location of the stairway it found. Keep in mind that I haven't tested it, so it probably needs some debugging, but the concept still works (I've done it before). |
You might want to look up locate() in the reference while you're working with this, if you haven't already.
usr.loc = locate(X,Y,Z) where X is the horizontal value, Y is the verticle value, and Z is the map value. |
Yes i know what x,y, and z mean, now I have another problem, both maps have the z coordinate as 1, now what do I do?
|
KnightRen wrote:
Yes i know what x,y, and z mean, now I have another problem, both maps have the z coordinate as 1, now what do I do? Both of them don't have the z = 1, what dream seeker displays is what z levels are in one map file, the first map's z is now 2 because making a new map file pushes the z level of all the previous maps up one, your second map file's z level is 1. |
Ok now that I did that, it does 1 of 2 things, when I try the floor and walk on it on the new map, it sends me to a black screen, and when i try it on the old map, it does nothing but makes me walk backwards
|
KnightRen wrote:
Ok now that I did that, it does 1 of 2 things, when I try the floor and walk on it on the new map, it sends me to a black screen, and when i try it on the old map, it does nothing but makes me walk backwards You're getting your Z levels confused, or maybe even your x,y coords. |
Ok here is what I have
flashingfloor icon = 'flashingfloor.dmi' Entered(mob/M) if(ismob(M)) M.Move (locate (45,170,1)) And I the oldest map selected, but when I step on the tile, it does nothing, just treats it like a normal tile. (And yes the number is correct, its a 200x200 map size) |
If it's not doing anything, unless you goofed something up in the code, then you're teleporting yourself to your current location, which would make no difference.
try changing the X,Y coords and see if there's a difference. |
KnightRen wrote:
Ok here is what I have That code wouldn't work try this: turf/Flashing_floor |
It was because you used Entered() wrong and you didn't need the if(ismob(M)) mob/M or mob/M as mob does this already.
|
Ok, this works fine and dandy now, now 1 more problem, it starts me out right outside of my map, instead of inside, im right outside of my map, and I can see inside, i can even ghostform and go inside, but it starts me out outside....
|
Actually, the if(ismob(M)) line DOES matter, if it's not there, objs will be teleported as well when entering, and that can cause errors. I just tested it.
|
flashingfloor
icon = 'flashingfloor.dmi' Enter(mob/M) ..() M.loc=locate (45,170,1) this is what I have now, I wish you guys would make up your mind, what should I put in now? |
Oh yeah, for some reason ive also found out, it thinks the new map is 2, and not 1, opposite of what you said, because when i put in (45,170,2), (still starting right outside of the old map) it will take me to the new map, where the coordinate is.... almost got it figured out, lol, dont quit on me now ;)
|
make 1 map, and give it multiple Z layers, then you can switch maps that way. A Z layer is nothing but another map in one map file. Like have 5, 5, 5, thats 5 maps of 5 x 5.
mob
verb
Teleport(myx as num, myy as num, myz as num)
src.loc = locate(myx, myy, myz)
this will teleport you to ANYWHERE on the map that you type in.
FIREking