ID:148129
 
I just got BYOND and was doing a tutorial but when I went to complie and run the program my icon for the player will not move. However I can use the directional pad and the areas of visibility will dissapear or reapear as they would normaly, but the sprite will not move. My code is located below, it is fairly short...Any suggestions?


mob
character
icon = 'char.dmi'
Login()
world << "Hello world, [usr] has arrived."
verb
smile()
world << "[usr] smiles"
usr << "You smile"
turf
wall
icon = 'wall.dmi'
density = 1
opacity = 1
turf
icon = 'turf.dmi'


Thank you all very much for your time.
-Epoch
DJEpoch wrote:
I just got BYOND and was doing a tutorial but when I went to complie and run the program my icon for the player will not move. However I can use the directional pad and the areas of visibility will dissapear or reapear as they would normaly, but the sprite will not move. My code is located below, it is fairly short...Any suggestions?


mob
character
icon = 'char.dmi'
Login()
world << "Hello world, [usr] has arrived."
verb
smile()
world << "[usr] smiles"
usr << "You smile"
turf
wall
icon = 'wall.dmi'
density = 1
opacity = 1
turf
icon = 'turf.dmi'


Thank you all very much for your time.
-Epoch

I tested the code you gave me. The problem is that you forgot to call ..() in Login() after world << "Hello world, [usr] has arrived."
In response to Drafonis
Also,

USE DM TAGS!


Worlds: Worlds cannot read code - text not correctly formatted
In response to Drafonis
Ok,
I called the parent with that ..() piece but he still wont move and no messages are being displayed. I tried the client/New() proc in place of the Login() proc and it solved the message thing but not the movement, he still wont go anywhere. When I play other demo games they work fine, but I have never gotten the thing to move from my own code...
Thanks
-Epoch
In response to DJEpoch
Here's the code I made:

mob
character
icon = 'char.dmi'
Login()
world << "Hello world, [usr] has arrived."
..()
verb
smile()
world << "[usr] smiles"
usr << "You smile"
turf
wall
icon = 'wall.dmi'
density = 1
opacity = 1
turf
icon = 'turf.dmi'

In response to DJEpoch
DJEpoch wrote:
Ok,
I called the parent with that ..() piece but he still wont move and no messages are being displayed. I tried the client/New() proc in place of the Login() proc and it solved the message thing but not the movement, he still wont go anywhere. When I play other demo games they work fine, but I have never gotten the thing to move from my own code...

Three problems:

  • Don't mess with client/New(); it's not safe to screw with unless you're familiar with the pitfalls. Go back to using Login(), with ..(), and use src instead of usr in it because usr isn't all that safe there.
  • Take the /mob/character off your map. It's clear to me you added one to the map thinking that would do something there; it won't. Seeing it there but not seeing it move is confusing you.
  • Set world/mob to /mob/character. What you're seeing is not that your character won't move, but rather the mob you put on the map is staying put. The mob that's created for you when you log in, a regular /mob (because you didn't set world/mob to anything), has no icon so it's invisible to you.

    Lummox JR