![]() |
Pet?
What would be the best way to do this?
If you make a dog that you want to follow you around shold you use 1.Follow player and canwarp; or 2.Make it so that it stays exactly 2 x and/or 2 ys away? I have the gifs for a dog (not the actual pet) and I want it so that it stays about as far from a player as a bomy does when it follows. How would I do this? |
I would be happy if someone responds
|
Quote:
|
LOL, good idea.
Well, here is what I have if(created){ setimg idle.gif; } if(playerchats&&strequals(#c,come)){ followplayer; } if(playerdir==0){ setimg up.gif; } if(playerdir==1){ setimg left.gif; } if(playerdir==2){ setimg down.gif; } if(playerdir==3){ setimg right.gif; } For some reason it wont change the graphic when the player does. I asked Shadrock and he said to use functions because followplayer is bad so if anyone can get this working I would be happy. See ----> :) But seriously does anyone know whats wrong?? |
make a guinea pig in a cage
|
heh =D good idea
|
I have got a pet script for Frogs Rabites and Chickens :D
|
me too but i didnt look at them. What do they do?
|
OMg like I made dogs and cants and chicken pets on ToT =D And they eat stuff and go night night and I thought it was cool untill Mr. High and Mighty popeple steal the GFX >=(
NO MORE STEALING PLEASE! |
Sounds cool, are u a good scripter?
|
The playerdir checks need to be in a timeout loop.
|
uh oh, I dont know how to do timeouts right.
is it like if(created){ timeout=.5; setimg idle.gif; } if(playerchats&&strequals(#c,come)){ followplayer; } if(playerdir==0){ timeout=.5 setimg up.gif; } if(playerdir==1){ timeout=.5 setimg left.gif; } ?? something like that? I understand how they work but I have never used them and im not sure what part goes where. if(playerdir==2){ timeout=.5 setimg down.gif; } if(playerdir==3){ timeout=.5 setimg right.gif; } |
Quote:
duh you need aloop like this: if(created){ setimg idle.gif; } if(playerchats&&strequals(#c,come)){ followplayer; set dogfollow; } while (dogfollow) { if(playerdir==0){ setimg up.gif; } if(playerdir==1){ setimg left.gif; } if(playerdir==2){ setimg down.gif; } if(playerdir==3){ setimg right.gif; } if (playersays(stop)) { unset dogfollow; } sleep 0.05; } ok! |
=D thank you. Now i feel like an idiot. I am not good with loops or anything like that but im learning from looking at post with code in them on the message board =D
Thanks again Zokemon. |
np
i script stuff like that all the time |
I got one more question.
What if you wanted to make a dog do the same thing as bomys do? What I mean is like you know how when you say somthing bomys stop following you? Then they go and stay (or wander) a level until you get back. How would you make it so the server kept them on a level even when the person was not online and playing? |
Quote:
To keep them on seperate levels, you need an NPC SERVER. =) Also try not to post several topics related to the exact same thing please. Email me and I can give you some script examples that might help you out |
Alright, I will talk to ya on AIM or email soon. Right now im at a friends house and im going to a huge concert tommorow (Vans Warped Tour) but I will go home that night and contact you. Thanks alot man!!!
|
| All times are GMT +2. The time now is 11:15 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.