ID:266684
 
ok..I'm having some problems with this code..

this is the code for you to summon the bat.

mob/Bat
icon='Druids.dmi'
icon_state="Bat"


mob/SU
verb
Summon_Bat()
set category="Battle"
if (usr.bat<=usr.batmax)
usr<<"<font color=white><b>You summon a bat to help you."
new /mob/Bat(locate(usr.x+1,usr.y,usr.z))


and this is the code for the bat to follow you.

client
North()
if(usr:bat==1)
step(usr,NORTH)
walk_to(usr,usr.loc,1,1)
return
else
step(usr,NORTH)
return
South()
if(usr:bat==1)
step(usr,SOUTH)
walk_to(usr,usr.loc,1,1)
return
else
step(usr,SOUTH)
return
East()
if(usr:bat==1)
step(usr,EAST)
walk_to(usr,usr.loc,1,1)
return
else
step(usr,EAST)
return
West()
if(usr:bat==1)
step(usr,WEST)
walk_to(usr,usr.loc,1,1)
return
else
step(usr,WEST)
return

(I got that from GreenLimes Petting Zoo Demo)

But instead of it moving it just sitds there
Try something like,

mob/verb/SummonBat()
var/mob/M = new/mob/Bat(locate(src.x+1,src.y,src.z))
walk_to(M,src,1,0)

That should work, tell me if it doesn't. ALso tell me if that is not what you wanted.
In response to Super16
Ok..I put in your code and now I'm getting a Inconsistent indentation error.I used tabs not spaces BTW

mob/Bat
icon='Druids.dmi'
icon_state="Bat"
layer=5
density=0


mob/SU
verb
Summon_Bat()
set category="Battle"
if (usr.bat<=usr.batmax)
usr<<"<font color=white><b>You summon a bat to help you."
var/mob/M = new/mob/Bat(locate(src.x+1,src.y,src.z))
walk_to(M,src,1,0)
In response to Emperor Beld
Tab teh walk_to
In response to Super16
bah I though I did that thanks man!
In response to Emperor Beld
Now I have another problem..When the bat Enters an area that teleports you it causes and Illigal Operation error and shuts it down.Here is where it enters that messes it up...

    DarkE
icon='Forest Of Darkness.dmi'
icon_state="darkness"
layer=5
name=""
Entered()
usr.loc=locate(80,148,2)
src<<"<font color=white><b>Now entering Neophyte Island."
src<< sound('World4.mid',repeat=1)
In response to Emperor Beld
Emperor Beld wrote:
Now I have another problem..When the bat Enters an area that teleports you it causes and Illigal Operation error and shuts it down.Here is where it enters that messes it up...

> 
> DarkE
> icon='Forest Of Darkness.dmi'
> icon_state="darkness"
> layer=5
> name=""
> Entered()
> usr.loc=locate(80,148,2)
> src<<"<font color=white><b>Now entering Neophyte Island."
> src<< sound('World4.mid',repeat=1)
>
>





rotflmfao

In response to RaeKwon
???ugh..whats funny in that?
In response to Emperor Beld
Emperor Beld wrote:
???ugh..whats funny in that?

my dog shit on the floor.
- TheWizard
In response to RaeKwon
...-.- (are you rolling in it laughing?)
In response to Emperor Beld
If it's an illegal operation error, you should report it to Dantom! Illegal errors should never happen, and if they do it's BYOND's problem, not yours. Good luck!

-LoW