ID:318928
 
I need to know how to program a turf to make the mob move to move up z (1,1,1) --> (1,1,2)
I got male and female need to know how to code/make in south, west, east, north. And make the icon move when walking.
I'm trying to make a turn-based pokemon game like in the real games. need to know how to code how to change to map to battle screen, and how to do turns.
Sample code helps me the most. Sorry that I'm such a rookie programmer.
Use
turf
name = "portal"
icon = 'p123.dmi'
Entered(mob/M)
M.loc=locate(1,1,2)


Something like that I guess.

Although you should make sure only players get teleported. no monsters and the like
Take a look at some of the demos around here.
Specifically, turn-based demos, it won't teach you how to program a 'pokemon' battle system, but it's the same concepts where you can create your own out of it.
about the turf thing. I meant something that causes it to go up 1 z in general. don't want to code hundreds of turfs.
In response to Bendyhero01 (#3)
M.z+=1

But the same general code besides that as A.T.H.K

That will do what you want...
In response to A.T.H.K (#1)
A.T.H.K wrote:
Use
turf
name = "portal"
icon = 'p123.dmi'
Entered(mob/M)
M.loc=locate(1,1,2)



That is basically How Not To Do It but only barely marginally better.
Hahaha
what about my icon state(gender and directional) and how to show an animation when then move(like them walking). and how can I make mobs be able to go through each other but not go through 'density = 1 turfs'.
you need to set icon state based on their gender either prompted for in-game or using the gender specified on their users key...and directional is the movie state icon...animations play by default, nothing special than setting it to the animated icon....different directions can be set there as well as multiple states for single or multi-directional movement.

Going through each other could be done like Bump() for mobs and allow the move for mobs by setting the location directly on Bump() or set their density temporarily & use Move() which may not be neccessarry but if theirs problems with moving when they shouldn't with rules set that works with single players thats a fix...