Whats wrong here?
I have a actor. Its setting at a xy point when the scene start. When it starts it says if he is at that xy point to move right. But he doesnt move. And if he did move.... when he gets to 384/512 look at random and go where random tells him to. Seems to me the code is correct.. obviously its not. What am I doing wrong. I see it in my head. but its not working.
https://dl.dropbox.com/u/33589453/Untitled 2.zip
Im trying to duplicate the ghosts in Pacman. And using random to create a fake AI effect. Saying at intersection ( if X/Y is this) decide 1-4 to move up left right or down. which will take them to another crossroads that checks random each time.
https://dl.dropbox.com/u/33589453/Untitled 2.zip
Im trying to duplicate the ghosts in Pacman. And using random to create a fake AI effect. Saying at intersection ( if X/Y is this) decide 1-4 to move up left right or down. which will take them to another crossroads that checks random each time.
Answers
It's been a while since I've used randoms, but if I remember correctly, it's very hard to make a random work within repeating timer. I could be remembering wrong. I might be thinking of using a random amount of time, but you might have to change up how you're doing random so it's being done manually. I can't remember how to do that, but somebody here probably does, if you can't find it through searching.
I hope some of that was helpful/not too rambly.
Asymptoteell
I wonder if tables could be used to make this effect? Im still not full aware of what tables actually do. I get lost when watching a tables tutorial.
On a more related note, now that I'm thinking about it, I think replacing your move with an Interpolate of your X and Y positions just might work. If I remember correctly, Interpolates always run to completion which I think is what you want here.
I'm not sure if it will solve all your problems regarding randoms, etc., but that might at least make your actor move.