ID:266294
 
Well please help Vampire. PLLLLLEEEEAAAASSSSEEEE.

The characters in my game are 3 tiles tall. Which is fine and all until i compile i get these two erreors:

error.top.icon: left hand side must be an odject variable

and the same for bottom.icon

please help. Point me in the right direction and ill be happy.

Novice Vampire
Vortezz has a tutorial on Multi-tiled mobs. Are you using that in your game? Is your a combat-type game? Some examples of your code would help....

~X
In response to Xooxer
Ive almost completely given up. I fixed the errors i was getting but then no errors and a login code in place the characters were looking good. But they refused to appear on the screen this is my code as it looks..

mob
var
obj/body/top
obj/body/middle
movetimer

Move(Loc)
if(world.time < movetimer) return
movetimer += 1
..()

var/turf/T = locate(x,y +2,z)
if(T)
top.loc = T
else
top.loc = null
New(Loc)
..()
top = new()

var/turf/M = locate(x,y +1,z)
if(M)
middle.loc = M
else
middle.loc = null
New(Loc)
..()
Middle = new()


obj/body/middle
density = 1
layer = 4.5


obj/hair/top
density = 1
layer = 4.5


mob
New()
..()
top = new()
middle = new()



mob
Vampire
icon = 'legs downtown clash leader.dmi'
New()
..()
top.icon = 'Leader Downtown Clash.dmi'
icon_state = "Body"
<style="color:red">New()
..()</style>
middle.icon = 'Leader Downtown Clash.dmi'
icon_state = "Hair"
key = "Baby Vampire"


Looking back it now tho i think i found why nothing would show is it the parts marked in red?
In response to Baby Vampire
Baby Vampire wrote:
Looking back it now tho i think i found why nothing would show is it the parts marked in red?

No (although your tag didn't quite work; try FONT to set things to red). The problem is in places like this:
Move(Loc)
if(world.time < movetimer) return
movetimer += 1
..()

So far so good. You should only need to call ..() once in this routine. Yet you call it again in a few places:
  var/turf/T = locate(x,y +2,z)
if(T)
top.loc = T
else
top.loc = null
New(Loc)
..()
top = new()

Major problems right here. First: You shouldn't need to create a new top object every time the mob moves; you should create top and middle in your New() proc. The last three lines of that (everything after the if/else block) are totally useless. Calling New(loc) calls src.New(loc); it shouldn't create a new object, but it will adjust your mob's settings as if it had just been created. The call to ..() calls the current Move() routine again, and top = new() is useless because this is not only re-creating the top object, but it's moving it to a null location. Get rid of those last three lines.
The if/else block and locate() can actually be replaced with the single statement top.loc=locate(x,y+2,z), since if the result of locate() is null, you want top.loc set to null anyway.
  var/turf/M = locate(x,y +1,z)
if(M)
middle.loc = M
else
middle.loc = null
New(Loc)
..()
Middle = new()

Again, the last three lines have to go.

Your revised code should look like this:
Move(Loc)
if(world.time < movetimer) return
movetimer += 1
..()
top.loc=locate(x,y+2,z)
middle.loc=locate(x,y+1,z)

Notice it's a lot simpler; that should do the trick for you.

Lummox JR