Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > General > Gaming and Game Development

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-20-2012, 01:47 PM   #1
Oskil
Senior Member
 
Join Date: Jun 2012
Posts: 121
Default [AS3] how make Score Counter with the MC position x

i make game car go and stop using as3 but i dont know make score if MC stop in x position and make score..

somebody can help me?
Oskil is offline   Reply With Quote
Old 08-20-2012, 02:00 PM   #2
lordofduct
Senior Member
 
lordofduct's Avatar
 
Join Date: Feb 2008
Location: West Palm Beach, FL
Posts: 3,770
Default

We need more information than that.


Is this "MC" a gauge of some short? If so what is the max value, and min value?

Is this "MC" text that changes to show the score?

Is this a magical school bus that travels all over the world teaching us about the wonders of science and math.
__________________
www.lordofduct.com - come read my blog!

If you want to know how to program, take a math class, take a lot of math classes!
lordofduct is offline   Reply With Quote
Old 08-20-2012, 02:26 PM   #3
Oskil
Senior Member
 
Join Date: Jun 2012
Posts: 121
Default

if I click Btn(go) car this.x +=10;
and then I click Btn(stop) car.stop();
how make score if MC car stop and certainly with position X..

tanks
Oskil is offline   Reply With Quote
Old 08-20-2012, 03:05 PM   #4
mrNoddy
Senior Member
 
Join Date: Aug 2009
Location: London, UK
Posts: 115
Default

Quote:
Originally Posted by Oskil View Post
i make game car go and stop using as3 but i dont know make score if MC stop in x position and make score..

somebody can help me?
Something like this (this was rushed):

Code:
var endPoint:Point = new Point(0, 0);  //change those coords to your finish line

then in an enter_frame event handling function:

if (Point.distance(endPoint, carMovieClip) < 50) {
    //trigger code here to complete the race etc
}
mrNoddy is offline   Reply With Quote
Old 08-20-2012, 09:29 PM   #5
Oskil
Senior Member
 
Join Date: Jun 2012
Posts: 121
Unhappy

but in my game there is no finish line ..
such as the reaction of the brake pedal before the collision occurred when the car is running (this.x + = 10; and produce a score of X position when we click stop Btn ..
Oskil is offline   Reply With Quote
Old 08-21-2012, 07:11 AM   #6
mrNoddy
Senior Member
 
Join Date: Aug 2009
Location: London, UK
Posts: 115
Default

OK, I don't really understand what you need to do. Are you trying to get ashore for the distance between starting to stop and the car stopping?
mrNoddy is offline   Reply With Quote
Old 08-21-2012, 12:09 PM   #7
Oskil
Senior Member
 
Join Date: Jun 2012
Posts: 121
Default

yes sir..maybe like that
Oskil is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:50 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.