-
I am making a little horserace game. This is first thing I have really done on my own, scripting-wise, even if it really isn't that much. The game is you click a button, horses start going across the screen randomly, when one gets there, it goes to his respective frame with winner on it. Here is my script.
if (_root.horse1_x>500){
gotoAndplay(4);
}
if (_root.horse2_x>500){
gotoandplay(5);
}
_x1=_root.horse1._x
_x2=_root.horse1._x
vel1=Math.random()*20
vel2=Math.random()*20
_root.horse1._x+=(vel1^2)
_root.horse2._x+=(vel2^2)
The horses just keep going, ignoring the "if" statement. Before I was getting an error saying I had a script that was causet the player to run slowly, but I guess I got rid of that somehow. But, all I want is the movie to go to a page when one of the horses goes past that certain point. But those damn horses just keep going. What's my problem??? Please help me, I have been thinking for what seems like forever.
-
Moved to Flash 5 Actionscript...
...you'll likely get a better response here!
Regards,
Steve
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|