Guitar Hero Clone. Help?

Started working on a small (just the intro to a song) GH Clone. I need to set up the logic so that you can hold down the fret, but you have to push the strum every time. How?

All you need to do is make 2 keyboard sensors connected to an And controller. Make one sensor your fret key, and set it to true. Then just make the second the strum key, without setting it to true. You should be able to hold the fret, and then every time you hit the strum key, whatever your actuator is should work. Hope that helps.

that didn’t wok…

Here’s a quick example. The cube appears when you hold the down arrow and push space at the same time. When you hold the down arrow, the cube appears every time you press the space bar. Or is that not what you meant?

Magnum Opus: I think that’s what I meant…have you played GH2? You can hold down the fret button, but you have to push the strum button for every note. Do you get it?

Maybe I’m not understanding what you’re asking :confused: but in my example, the down arrow is the fret and space is the strum bar. (And yes, I have played GH2). The only problems I can see in my example are that you can push the buttons in the wrong order, and you can also hold them down (which you can do in GH anyway.) Here’s a more complete example:

Hope that answers your question.

The way I see it, you can just hold down Left, Down, Right, and Space and get all of the notes right,

Did you want an example with notes also? For that you could just up the logic bricks so that the “wrong” keys give a negative pulse. That way, you’d have to be holding only the correct key/s to get it right. Then you could have a timer property that goes to zero each time you strum, and make it so the notes only work when that property is, say, below .5. I thought shadow was just asking for how to make the buttons work right. I must have misunderstood his question. But the timer property will do it. In Guitar Hero, you can hold down every button (like in my example), but it only counts notes hit within a short amount of time (the timer property). 4th reply the charm?

I was thinking of making a GH clone. I also thought of trying to get my Wii guitar too work with it. For the keyboard setup I would borrow (steal) Frets on Fires, where F1 to F4 (or was it F5?) are the frets.

In GH you can hold down the frets at any time but when you strum it gets recognized. (Haven’t looked at the example posted here so maybe this is unnecessary) I think I would do it something like this:
the notes has an invisible box around them (to make them a little more forgiving) each time they overlap the markers at the bottom of the screen a property/variable turns true. Then compare the pressed buttons to the values each time you strum. Maybe add another layer of tests for each fret button…
if fret one is pressed and note one is true then fret_one_hit = 1/true

if fret two is not pressed and note two is false then fret_two_hit = 1/true

if fret three is pressed and note three is false then fret_three_hit = 0/false

if fret four is not pressed and note four is true then fret_four_hit = 0/false

(of course every note/fret has to have all of these condition)

Then just: if spaced is pressed and fret1,2,3,4 is true: win
else: fail

can be done with logic bricks or python.

A detail: if you have a yellow note (the third from the left) you can hold down green and red (first and second) while you play it. Doesn’t work when there are two notes at the same time.

Okay, obviously I have zero teaching skills. But this time, I have further evolved my once-simple cube example into the closest thing to Guitar Hero that I will make a demonstration for.

This uses the same basic set up as my last example, I just added some actual gameplay to it. First off, if you select the camera, you will almost immediately be greeted by a welcoming cluster of knotted-up lines of logic bricks. :spin: It’s not really that complicated though. It just means that the camera sends out a message depending on the combination of pressed keys.

For example, if the space bar and left arrow key are true, but the down and right arrows are false, it sends a “left” message, and so on. These messages are recieved by the “notes” (the cubes on the second layer.) If they recieve the correct message at the correct time, they end and send a message to add to the score, which is just an overlay scene.

To get the timing perfect, I animated the notes with ipo’s, instead of dloc. The ipo is run by an integer property, which means I know that the note will be in the “hit” position on the 11th frame. For some leeway, the notes accept the message between the 10th and 12th frames.

A timer property makes it impossible to just hold space the whole time. The message is only recieved if the timer is between 0 and 0.1. Space resets it to 0. Unlike the real GH, I made my example so that chords or combo notes or whatever have to BOTH be hit, but that could be easily changed if you wanted to grant “partial credit” for getting only one of the two notes in the chord.

Finally, the actual play system, which is completely stored on the empty in the first layer. All the notes are added from logic bricks. I don’t know if you have any musical background, but the basic rules apply in the game, just like on a real instrument. The empty has an int property, which is set to increase constantly by 1. Changing the frequency on the Always sensor changes the tempo. I set it to 5. A frequency of 10 would be half as fast, and hyper speed would be around 2 or 3. Just keep in mind that this value will obviously not change the speed at which the actual song is played.

So, the added notes just need to follow the beat. If you look at the property sensors, the first few notes have a difference of 4. That can then be divided in 2 or doubled to get notes closer together or further apart, but still following the beat. Since my example has no end, the last logic bricks tell the sequence to repeat.

Well, sorry for the long explanation, and the time it took to finish the example. If you just skipped down to this last sentence and your question still isn’t answered, it should be somewhere above :rolleyes:, otherwise you might be able to figure it out from the .blend.

Good luck with your game.