ID:263258
 
Code:
world
//Configure the mob type to create when players log in.
mob = /mob/player
name = "simple world"
hub = "captain dale.simpleworld"


turf
floor
icon = 'floor.dmi'

grass
icon= 'grass.dmi'

road
icon= 'road.dmi'

path
icon= 'path.dmi'

hedge
icon= 'hedge.dmi'
density = 1 //cannot walk through walls
wall
icon = 'wall.dmi'
opacity =0 //cannot see through walls
density = 1 //cannot walk through walls

House
icon= 'house1.dmi'
density = 1 //cannot walk through walls
House2
House
icon= 'house1.dmi'
density = 1 //cannot walk through walls

House2
icon= 'house2.dmi'

door
icon='house2.dmi'
density = 0
Entered(mob/M)
M.loc = locate(3,38,1)


house3
icon='house3.dmi'
density = 1 //cannot walk through walls


hedgeleft
icon= 'hedgeleft.dmi'
density = 1 //cannot walk through walls

woodfloor
icon= 'woodfloor.dmi'

flowers
icon= 'flower.dmi'

area
area1
area2



area
var
look
sound

// Entered()
//Put the cursor on "Entered" and press F1 to learn
//more about this procedure. You can also press F1
//on the << operator to learn about that.

mob
var
hp = 100
maxhp = 100
GM
controled
Master
blind

player
icon = 'player.dmi'
Stat()
statpanel("Inventory",contents)
// Bump(atom/obstacle)


verb
look()
usr << "You see:"
for(var/O as obj|mob in oview())
usr << "\a [O]"

// conversation
say(msg as text)
view() << "[usr] says, \"[msg]\""

shout(msg as text)
world << "[usr] shouts, \"[msg]\""

whisper(msg as text)
view(1) << "[usr] whispers, \"[msg]\""

tell(M as mob in world, msg as text)
M << "[usr] tells you, \"[msg]\""

// configuration
myname(arg as text)
name = arg

myicon(arg as icon)
icon = arg


Problem description:

my man won't teleport when he goes to housde 2, even though i have the code...what's happening??
try using Enter() instead of Entered(mob/M)
In response to HXC
Yes.

Use the following:


area
test
Entered(mob/M)
sleep(1)
M.loc=locate(1,1,1)



That's just something I wrote as a test. However alignment is probably screwed up so here is an Area from my game.

Hogwarts_Enter
Entered(mob/You/M)
sleep(4)
if(M.monster==1)
return
else
M.loc=locate(13,25,21)
In response to Ragnarok HGM
Ragnarok HGM wrote:
Yes.

Use the following:


area
test
Entered(mob/M)
sleep(1)
M.loc=locate(1,1,1)



That's just something I wrote as a test. However alignment is probably screwed up so here is an Area from my game.

Hogwarts_Enter
Entered(mob/You/M)
sleep(4)
if(M.monster==1)
return
else
M.loc=locate(13,25,21)
But what object will be the door then???
In response to Ragnarok HGM
Ragnarok HGM wrote:
Yes.

Use the following:


area
test
Entered(mob/M)
sleep(1)
M.loc=locate(1,1,1)



That's just something I wrote as a test. However alignment is probably screwed up so here is an Area from my game.

Hogwarts_Enter
Entered(mob/You/M)
sleep(4)
if(M.monster==1)
return
else
M.loc=locate(13,25,21)

That'd never work, and even if it would, it's really in-efficient.

turf/test_entrance/Entered(mob/m)
if(ismob(m) && m.client) m.loc = locate("somewhere") //assuming only the players can enter
else return 0
In response to DivineO'peanut
DivineO'peanut wrote:
Ragnarok HGM wrote:
Yes.

Use the following:


area
test
Entered(mob/M)
sleep(1)
M.loc=locate(1,1,1)



That's just something I wrote as a test. However alignment is probably screwed up so here is an Area from my game.

Hogwarts_Enter
Entered(mob/You/M)
sleep(4)
if(M.monster==1)
return
else
M.loc=locate(13,25,21)

That'd never work, and even if it would, it's really in-efficient.

> turf/test_entrance/Entered(mob/m)
> if(ismob(m) && m.client) m.loc = locate("somewhere") //assuming only the players can enter
> else return 0
>

I need help big time, where shall i put that code? i am realyl lost now with all these codes
In response to Captain Dale
> Hogwarts_Enter
> Entered(mob/You/M)
> sleep(4)
> if(M.monster==1)
> return
> else
> M.loc=locate(13,25,21)

What DivineO'peanut was saying is to replace:
     if(M.monster==1)
return
else
M.loc=locate(13,25,21)

With:
     if(ismob(m) && m.client) m.loc = locate(13,25,21) //assuming only the players can enter
else return 0

But you should know that the reason your code doesn't work is indentation
 Hogwarts_Enter
Entered(mob/You/M)
sleep(4)
if(M.monster==1)
return
else
M.loc=locate(13,25,21)

That should work too. At least from what I've learned in tutorials.That should work too.
In response to Hellsing4
You don't need an else wen you're returning in the if().
In response to Hellsing4
Hellsing4 wrote:
That should work too. At least from what I've learned in tutorials.That should work too.

That could, but my version is faster, safer, and much more efficient.
In response to Hellsing4
i am lost now