obj //IMPORTANT OBJECTS
var/obj/Piece/RealPiece //
Move_Cards //Move Cards needs to be fixed.
icon = 'Graphics.dmi'
New()
verbs += /obj/Piece/proc/Move_Spaces
Click()
verb/Use(mob/Player/M in view(0))
src = M
src.UseCard(icon_state)
usr << "Feature not implemented yet."
Piece
var
mob/owner // This is here so the piece can connect with the mob who owns it
moving // This is so Click can know if the piece is still moving or done.
movecarding = 0 // If the player is using a movecard..
proc
Move_Spaces(spaces) //This handles spaces to move.
moving = 1
usr << "You rolled a [spaces]!"
sleep 10 //Sleep for one second so everyone can look at what they got.
while(spaces-- > 0) //While the spaces are over 0, make sure I'm with my piece.
owner.loc = src.loc //If the user isn't focused, then it doesn't matter because he's with his piece.
step(src,src.dir)
sleep(3.3) //If it doesn't sleep, the proc kind of crashes.
moving = 0
if(movecarding)
Land()
movecarding = 0
else
usr << "Use a card?"
sleep(20)
Land()
mob/Player/proc/UseCard(number)
piece.movecarding = 1
piece.Move_Spaces(number)
Problem description:
Ugh, I can't figure out how to get my Mob's Piece obj to Move_Spaces(icon_state) when I Click on a Move Card in the inventory. As you can see, I've tried adding the Move_Spaces proc as verbs to Move Cards so it could recognize it and move my Piece with the proc, but to no avail. I've tried making a verb and setting the mob in the argument, and I know click is blank, it's like that because well, it didn't work either when I was trying to achieve my goal. I've been stuck on this for awhile sadly, and I'm growing more and more desperate, I don't care if you slap me in the face, just help me out and quick.
-Thanks a lot.
step(src,src.dir)
Do you have to set the pieces direction too?