Reply to Re: Making sprites avoid each other
If you don't have an account, just leave the password field blank.
Nope, that's not unnecessarily complicated enough for me
EDIT: I have to go to a sport club type thing now, I'll be back in an hour and a half
'NOTHER EDIT (so I don't have to keep making new posts): Right, I've worked out how I'm gonna do it now, so all that's left is to actually type it. It's getting perhaps a little longer than would have been nice, but if anyone is interested in seeing it I'll probably be done in around an hour (unless un-foreseen problems arise, which isn't all that unlikely)
EDIT AGAIN: The math is really annoying, so I expect it'll take longer than I hoped...
FINAL EDIT FOR A WHILE: Right, I've got it. He can tell where Dink is, and moves away from him if he's within 200 pixels. Then, when he gets cornered, the script checks if he'll become closer to Dink if he moves vertically or horizontally (so if he was in the top-left corner, he would check if he'd get closer to Dink by moving downwards, or by moving right). The script then makes him move in whichever direction keeps him furthest away from Dink. Then it starts all over again. I've only got it working for the top-right and top-left corners at the moment. This isn't because I'm stuck, I'm just starting to get sick of the coding. I'm gonna go play crash bandicoot or something mind-numbing, then come back to the scipting. I never knew DinkC could become this mathsy
EDIT THE FOURTH... I MEAN FIFTH: Ok, I've got it working for all the corner's now, but I'm encountering a few glitches involving the guard going off screen. Unlike Kyle said, I'm not sure if it's becuase of how I'm doing it or what, but... When the target value goes off screen it kinda spazzes the guard around the edge of the screen. So I'm fixing these bugs (which I thought I'd already fixed but apparently haven't) and then I'll upload this either today or tomorrow if anyone wants to see

EDIT: I have to go to a sport club type thing now, I'll be back in an hour and a half

'NOTHER EDIT (so I don't have to keep making new posts): Right, I've worked out how I'm gonna do it now, so all that's left is to actually type it. It's getting perhaps a little longer than would have been nice, but if anyone is interested in seeing it I'll probably be done in around an hour (unless un-foreseen problems arise, which isn't all that unlikely)
EDIT AGAIN: The math is really annoying, so I expect it'll take longer than I hoped...

FINAL EDIT FOR A WHILE: Right, I've got it. He can tell where Dink is, and moves away from him if he's within 200 pixels. Then, when he gets cornered, the script checks if he'll become closer to Dink if he moves vertically or horizontally (so if he was in the top-left corner, he would check if he'd get closer to Dink by moving downwards, or by moving right). The script then makes him move in whichever direction keeps him furthest away from Dink. Then it starts all over again. I've only got it working for the top-right and top-left corners at the moment. This isn't because I'm stuck, I'm just starting to get sick of the coding. I'm gonna go play crash bandicoot or something mind-numbing, then come back to the scipting. I never knew DinkC could become this mathsy

EDIT THE FOURTH... I MEAN FIFTH: Ok, I've got it working for all the corner's now, but I'm encountering a few glitches involving the guard going off screen. Unlike Kyle said, I'm not sure if it's becuase of how I'm doing it or what, but... When the target value goes off screen it kinda spazzes the guard around the edge of the screen. So I'm fixing these bugs (which I thought I'd already fixed but apparently haven't) and then I'll upload this either today or tomorrow if anyone wants to see