Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-29-2008, 06:23 AM   #1
Mayhew
Registered User
 
Join Date: Sep 2008
Location: Florida
Posts: 9
Default Keeping Score

Hoy there, ActionScripterz. Yeah uh... I have this 3rd issue regarding score-keeping. You see, because my game's map is too large for a single frame, a new frame is obviously needed. First off, allow me to show you my scoring system. (sorry for the huge screenies :: Scroll down for more info if you plox)

SCREENSHOT 1 :: The Score on 4th to 19th Frame, Main Time line.


SCREENSHOT 2 :: Here's Link BEFORE loading NEW map (We are currently @ Frame 4). Score is Normal.


SCREENSHOT 3 :: Here's Link AFTER loading NEW map (Now we are @ Frame 5). All scores maxed out. D:<

So here's the score: It may not look it, but on the 3rd screenshot Link has already loaded the new map (it's a duplicate map, for testing purposes). HOWEVER~!!! After this new map loads, the score (RUPEES as well as other status points such as HEALTH & LIVES) completely max out. Now I'm no pro, I've spent several weeks on this subject alone. Could this be a difficult matter? How may I keep the scores from being affected by the map loads/frame change? Help appreciated! Helpers credited~!

If this post is too difficult to understand, let me know. Yus?
______________________________________________

My Recent AS Pros
mrownage (Cameron Gullotta) - [Enemies AI] (When Enemies detect)
x-death - [Enemy AI :: HP] (Enemies have a life too!)

Last edited by Mayhew; 10-29-2008 at 06:33 AM.
Mayhew is offline   Reply With Quote
Old 10-29-2008, 01:31 PM   #2
pradvan
Senior Member
 
Join Date: Sep 2005
Location: NYC
Posts: 250
Default

I think we need to see some code... hard to see what's causing that.
__________________
FreeActionScript.com- AS2 & AS3 Game Tutorials, Samples, Source Files & Downloads
pradvan is offline   Reply With Quote
Old 10-29-2008, 02:47 PM   #3
fitz
Registered User
 
Join Date: Apr 2008
Posts: 173
Default

Yup, no chance in finding the bug without code. Post your whole FLA if you want.
fitz is offline   Reply With Quote
Old 10-29-2008, 11:11 PM   #4
orange gold
got as?
 
Join Date: May 2007
Posts: 628
Default

i understand why he doesnt wana post his whole project online... on the level before that set a variable when he leaves for all of his items.. example

bobjoe = lives.text

or something like that... then on the next level on the onEnterFrame code enter this...

lives.text = bobjoe

that way its the same.. as it was when you left the last level

if that doesnt work you might need to show us some more code.
orange gold is offline   Reply With Quote
Old 10-31-2008, 08:57 AM   #5
Mayhew
Registered User
 
Join Date: Sep 2008
Location: Florida
Posts: 9
Default Keeping Score During Frame Change.

Okay, I apologize that my last post didn't help you understand. And I can't put up my whole project, since there are way too many things in there I'm worried about other people taking. Anyway, My issue is this: Say, for example, the first frame in the main timeline has his code ready:
ActionScript Code:
score.text = 0; health.text = 60; lives.text = 3;
In the game, everything works fine until my character "Link" loads the second frame in the main timeline. All the points on that second frame then suddenly max out completely:

Score: 500 (max)
Health: 999 (max)
Lives: 3 (max)

---But they're not supposed to max out. They are supposed to continue scoring from where Frame 1 left off. D:
On the second frame, the code is the exact same thing:
ActionScript Code:
score.text = 0; health.text = 60; lives.text = 3;

OrangeGold, you mentioned a code that may have given me ideas. You mentioned OnClipEvent(enterFrame)? I'm assuming there is some necessary code to add in my character's movieclip, Oy? I'll attempt to work on it, but I would very much appreciate a little more assist. But thank you at least for taking the time to help me.


If this is still difficult to understand, please take this brief FLA file that demonstrates my very same issue: http://files.filefront.com/Keep+Teh+.../fileinfo.html Remember! In the fla file, when running the preview, collect the green pickups before heading into the blue bar ahead of you. After you've collected 7 points, go thru the blue bar to load the next frame of the main timeline. Your points will be maxed out just as I feared.

Last edited by Mayhew; 10-31-2008 at 10:05 AM.
Mayhew is offline   Reply With Quote
Old 10-31-2008, 12:26 PM   #6
pradvan
Senior Member
 
Join Date: Sep 2005
Location: NYC
Posts: 250
Default

The scrore doesn't actually max out. Trace it in your onEnterFrame and you'll see.

What happens is, you have copies of the text boxes on each frame. So, when you switch frames the value in those text boxes gets screwed up.

Place the score/health/whatever on its own layer. Give it only one keyframe on the first frame, and extend that layer to cover all the map keyframes.
__________________
FreeActionScript.com- AS2 & AS3 Game Tutorials, Samples, Source Files & Downloads
pradvan is offline   Reply With Quote
Old 11-01-2008, 12:13 AM   #7
Mayhew
Registered User
 
Join Date: Sep 2008
Location: Florida
Posts: 9
Default

Mkay, I just realized the onEnterFrame is something I haven't used before. So now we're getting somewhere. Thank you, Pradvan & Orange Gold.

This is what came up so far:
ActionScript Code:
onClipEvent (enterFrame) { my_mc.onEnterFrame = function () {     trace ("onEnterFrame called"); }
Nothing's been done yet because I'm not quite familiar with its use yet. It looks like the code belongs in a movieclip. Okaaay~ So then, as Pradvan stated, I must give the score its own layer and its own frame.. then stretch/extend that frame so that it covers the map frames on the other layer. Like this?

As usual, the score.text goes in the score layer's extended frame, then the onEnterFrame goes in my character's movieclip on every frame in the Map Layer. I'll experiment with the onEnterFrame, but if you please, how would it be used in my case?

Last edited by Mayhew; 11-01-2008 at 12:39 AM. Reason: Typos <3
Mayhew is offline   Reply With Quote
Old 11-03-2008, 01:42 PM   #8
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

[MODERATOR]
Please do not remove the thread when somebody else is helping... Thank you...
[/MODERATOR]
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 11-03-2008, 01:47 PM   #9
pradvan
Senior Member
 
Join Date: Sep 2005
Location: NYC
Posts: 250
Default

So that's what happened to the thread. So I'm assuming you fixed the issue with the game?
__________________
FreeActionScript.com- AS2 & AS3 Game Tutorials, Samples, Source Files & Downloads
pradvan is offline   Reply With Quote
Old 11-03-2008, 01:50 PM   #10
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

The thread was removed, so I reinstated it...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeping Score suzierthanyou ActionScript 2.0 2 04-29-2008 06:50 PM
I have the same problem score keeping codatac ActionScript 2.0 0 05-21-2006 03:41 PM
[AS2] Score Keeping mrxbrian Gaming and Game Development 1 05-21-2006 01:44 PM
Graphical Score Keeping WizyWyg ActionScript 2.0 4 12-20-2005 12:49 PM
Keeping high score in string JoElAtHaN ActionScript 2.0 5 11-28-2003 10:45 AM


All times are GMT. The time now is 02:10 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, 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.