I've read what Dream Maker has to say on walk_to and from what I can tell, walk_to does not return a value.
If this is the case, how would I make it so that something ONLY happens after it walks to the object that was clicked. I tried using get_dist to check if the distance was 1 but I couldn't store that info in a variable.
ID:179574
Dec 2 2001, 3:19 pm
|
|
Dec 2 2001, 5:42 pm
|
|
I'm kind of new here but this code might work.
|
In response to Light
|
|
Putting get_dist() in if() gives me a bad assignment error.
|
In response to Evilkevkev
|
|
I got it to work by checking to see if the distance was greater of less than 1 and then if no it works as normal. It's a waste of code but it works.
[EDIT] My problem is now, that my Click() proc doesn't wait until walk_to() finishes to check the distance. This probably has everything to do with the fact that walk_to() returns after every step. Any way to solve this? |