-
-
THis how its should go
A star comes down the fretbar(HIghway on guitar) when it touches the star down the bottom you have to press 1 then the score goes up 500 and the star dissapers then it duplicates the movie clip!
-
-
If they miss the star continues past the line then deletes it self and starts again (ive allready done this animation) the volume goes down a bit and 10 points are deducted from the score!
-
-
Seriously go check this game out it will show you what im doing:
http://www.addictinggames.com/guitarmasters.html
theres no spam or anything!
-
If you look at that game or play it youll get a really good understanding
-
-
-
Game Maker Guy, you should really just edit your posts instead of posting a new one each time.
the code you should put in the frame actions is as follows:
PHP Code:
target1.onEnterFrame = function() { if (Key.isDown(49)) { if (target1.hitTest(note1) == true) { if (note1.point_dealt == false) { _global.score += 500; song.setVolume(100); note1.point_dealt = true; } } else { if (note1.point_dealt == false) { _global.score -= 10; song.setVolume(60); note1.point_dealt = true; } } } _root.scoreBox.text = _global.score; };
what this does, is each step (or frame) the target1 checks to see if the 1 button is held down (KeyCode 49) and if it is, it makes sure that the points for that note haven't already been given or taken away (for a hit or a miss). If the note is touching the target then 500 points are added to the score, and if the note is not touching the target (a missed strum) then 10 points are taken away.
Make sure you change the object "song" to whatever object or instance your music playing is called, as the song.setVolume is how it is controlled (in percentage, ie: 60 is 60% of full volume.)
also, the line "_root.scoreBox.text = _global.score;" I believe can be replaced with your updateScore() function.
-bjh
PS: Projects take a long time, if you are to truly get a guitar hero game going like you plan, it will take longer than I believe you expect it to.
Last edited by bjh; 02-16-2009 at 02:14 AM.
-
-
target1.onEnterFrame = function() {
if (Key.isDown(49)) {
if (target1.hitTest(note1) == true) {
if (note1.point_dealt == false) {
_global.score += 500;
song.setVolume(100);
note1.point_dealt = true;
}
} else {
if (note1.point_dealt == false) {
_global.score -= 10;
song.setVolume(60);
note1.point_dealt = true;
}
}
}
_root.scoreBox.text = _global.score;
};
-
Originally Posted by Game Maker Guy
Not working
Would you mind clarifying, I am trying to help you after all.
-
YEP NOT WORKING? IVE CHANGEED THE SONG NAME TO song
and ive tested it out when i press 1 nothing happens i tried changeing it to KeyUP but that dosent work either any ideas?
-
YEs u are definitly helping me alot! THANK U FOR UR EFFORTS!
-
YOu probley need to take me through each step
tell me what things i need to change names of ask me what what is called and check that everything works with the code-
Im not a genuis like you at flash but through the internet and extremley helpfull people like you i am learning and some day i wont have to bother people as much to find out things.
-
would you mind posting your .fla?
-
SO what do we need to do?
-
-
Ok how do i post my flash?
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
|