Reply to Re: Making sprites avoid each other
If you don't have an account, just leave the password field blank.
Maybe, but I wanna give it a few tries myself first, self-satisfaction, you know...
EDIT: Right, I think I've come up with a rough method of getting it to work (I'll improve it later, I just wanna get the core-concept first) but I need to make one variable equal to the sum of one variable and one constant number. However, I cannot change the first variable or it will screw up another bit of the code. This is an example:
But the problem is that DinkC doesn't let you do that, so any ideas?
EDIT AGAIN: Nevermind, I found a way around it.
I guess I just wasn't thinking straight, I was too busy working out what the math itself should even be
EDIT THE THIRD:
If anyone ever updates DinkC, let it be known that we need more than two conditions for an if statement. I want to use (&var1 < &sprite < &var2) but NOOOOOO becuase DinkC is too thick to even being to comprehend what that means
so I have to use two seperate if conditions and end up with thousands of brackets all over the place when it could be so much neater! Raargh!
Despite the rantingness, it WOULD be nice to have multiple conditions in an if statement though, stop me getting so scrambled making this
FINAL EDIT:
Now, I know it's strange, but I'm one of those people who moderately enjoy coding, so no-one post a script for it 'till I've made time to make my own
I've so far got enough code to check if the guard is within a specified range, and I've started on the next phase of the code, so... Yeah.
EDIT: Right, I think I've come up with a rough method of getting it to work (I'll improve it later, I just wanna get the core-concept first) but I need to make one variable equal to the sum of one variable and one constant number. However, I cannot change the first variable or it will screw up another bit of the code. This is an example:
int &var1; int &var2; &var2 = &var1 += 200;
But the problem is that DinkC doesn't let you do that, so any ideas?
EDIT AGAIN: Nevermind, I found a way around it.
int &var1; int &var2; &var2 = &var1; &var2 += 200;
I guess I just wasn't thinking straight, I was too busy working out what the math itself should even be
EDIT THE THIRD:
If anyone ever updates DinkC, let it be known that we need more than two conditions for an if statement. I want to use (&var1 < &sprite < &var2) but NOOOOOO becuase DinkC is too thick to even being to comprehend what that means


Despite the rantingness, it WOULD be nice to have multiple conditions in an if statement though, stop me getting so scrambled making this

FINAL EDIT:
Now, I know it's strange, but I'm one of those people who moderately enjoy coding, so no-one post a script for it 'till I've made time to make my own
