ID:150105
 
I have a pet code were they follow you but youc an trian you Zeo and fight it but how would i make two Zeos fight i allso need a icon maker to help with game plz help me.

Unix
The pet code im using



mob/player
var/list/pets

New()
pets=list("bat") // fill this in later

Move(atom/newloc)
.=..()
for(var/obj/pet/P in pets)
P.Follow(src)

Bump(O)
if(O in pets)
// switch places
var/obj/pet/P=O
var/atom/loc1=loc
var/atom/loc2=P.loc
loc1.Exited(src)
loc2.Exited(P)
loc=loc2
P.loc=loc1
loc2.Entered(src)
loc1.Entered(P)

obj/pet
var/owner
density=1

proc/Follow(mob/player/P)
step_to(src,P,0)
In response to Unix
HELP ME
In response to Unix
Help me
In response to Unix
Unix wrote:
Help me

No, we don't tend to help people who repost every 5 minutes. Sorry.
How do you want to make them fight?
In response to Deadron
Dreadron you know what errrrrm screw you
In response to Unix
var/savefile/F = new("Dont bump your posts.sav")
F["Unix"] << "Violator"

That's my save file lesson for today!

As far as answering your question... try this:
mob/proc/Pet_Choosetarget()
var/pet = locate(yourpet.loc) // However, you find your pet, I don't care... just find it!
if(istype(pet,/mob/Pet))
for(var/mob/Pet/P in pet.oview())
break
pet.Attack(P)
return 1
else
world.log << "ERROR: [pet] is not a pet!"
return 0
mob/Pet/proc/Attack(var/something as mob in oview())
oview() << "[src] attacks [something]!"
var/xx
var/yy
var/zz
if(!something.client)
del(something)
else
something << "Bam! You're knocked out..."
xx = something.x
yy = something.y
zz = something.z
something.loc = null
var/knock = new /mob/knockedout (xx,yy,zz)
sleep(rand(rand(30,40),rand(90,110))
del(knock)
something.loc = locate(xx,yy,zz)
something << "You wake up again..."
icon='knockedout.dmi'


I created this, of couse, knowing nothing about your game or how it works. I hope you are happy!
In response to Lord of Water
I like LordofWater so much better than u Dreadron w8 a minute i don't like you at all Dreadron ha ha

Unix
In response to Unix
Unix wrote:
I like LordofWater so much better than u Dreadron w8 a minute i don't like you at all Dreadron ha ha

Unix

Good way to get your future questions answered.
In response to Deadron
I know it is thx for noticing
In response to Deadron
Stupid me! While I wrote that code, he spent his time being rude to you... sorry, Deadron. Unix -- become well-mannered in a flash or expect no respect (or help) from me. Not that I can speak for anyone else, but I do know a few others who would be less likely to help a rude person... shape up!

-Lord of Water
In response to Lord of Water
Yes sir!!

Unix
In response to Lord of Water
Lord of Water wrote:
Stupid me! While I wrote that code, he spent his time being rude to you... sorry, Deadron. Unix -- become well-mannered in a flash or expect no respect (or help) from me. Not that I can speak for anyone else, but I do know a few others who would be less likely to help a rude person... shape up!

Thanks, LoW...and it's good you mention the time you took to write the code.

You probably spent 20 minutes writing that code, all the while he kept reposting, as if someone could do it in 2 minutes.

Anyway, it's clear Unix doesn't want my help so he doesn't need to worry about receiving it. I have no time for playing "I know you are" games with 5 year olds.
In response to Deadron
Deadron wrote:
Anyway, it's clear Unix doesn't want my help so he doesn't need to worry about receiving it. I have no time for playing "I know you are" games with 5 year olds.

He needn't worry about receiving mine anymore either. If you go down a page or two you'll find his post asking for "pet code" and I foolishly supplied some code that would do what he wanted, thinking he had at least a skeletonal game to put it into. Now here he goes and says that now he's gonna start a new game, and up and produces the same code I gave him as if 1) it's some fabulous find and 2) it could even remotely be central to a game. As if that wasn't obnoxious enough, the post bumping just went way out of line, and then he turns on people who tell him not to do that. Looks like the ingrate's gonna be going it alone.

Lummox JR
In response to Lummox JR
That guy is an idiot saying bad things to Deadron, He should show respect to people that are much better than him; as people and coders.