Need help where to start

Thank you guys for helping me. I have made HUD simple system similar to laifa’s but a bit simplier - with only one collision object, now fretbar is in horizontal position at bottom of screen, and collision object placed in center - spheres\keys are moving from right to left, and now spheres, representing keys, are parented to empty wich has ‘always’ sensor connected to ‘move’ actuator - to control speed of spheres. System has two scores - “hit” and “miss”. One score system is counting successfully pressed keys in straight order from 0 and other is counted missed ones in opposite order from 5 to 0. Reaching 0 missed score should activate character ‘falling’ animation and game is over - restart. So player can miss 4 times. It’s working like i wish with 4 spheres (keys) i made but i have problem. When i duplicate my spheres to place them on “fretbar” my miss score system fails - every time you hit needed key its always counted as “hit” and at same time as “fail” in my counters. It’s difficult to explain - I will try to upload my blend file it would be cool if you look at it and tell me where is mistake. Just try to play and it should be fine. But then just duplicate round keys(buttons) and try play again - score system is broken - “miss” score is always counted even if you press right way. :frowning:

Attachments

Test.blend (706 KB)

Ok it seems i managed to fix my problem, now scores are working as i wanted to. So i think basic HUD for mini game is ready next step is to attach actions (animations) to different states and make controllers play respective action for each condition. If player missed key character should be confused or lose his pace, if player missed 5 times then poor character would stumble and fall apart and game is over. And if player managed to play animation to the end he won game and his score should appear on screen. Here is fixed blend

Attachments

test_fixed.blend (1.02 MB)

good now you have enough knowledge with bge logic and you can make what you want. good luck to your game project

good luck to you CYNIC78

Thank you guys i hope i will be getting better with BGE and finish my first little game!

One more question laifa. About animation actions. In your very first example ‘stumble’ animation is played right exactly where character is during ‘gymnastic’ animation. And in your last example when triggered ‘ops’ anmation character is transfered to world center position no matter where he was before during previous action. So the question is - what difference in settings in both cases - how to make overlayed animation to play in location where exactle armature are, not in world center?

it’s the root bone the bone that when you move in pose mode it move all bones parented to it,( in my attachment the root bone name is mixamorig:Hips ) if you make the root bone in center during all animation the character will stay in center.

yes, and to make overlay-ed animation to play in location where exact armature are: remove the locations that make your character move, go to action editor and remove one of this locations from the root bone ( in Laifa attachment the root bone name is mixamorig:Hips (x locations (mixamorig:Hips)…etc )
see the difference after remove one or two:
X locations
y locations
z locations

Now i see. Root bone in first example has no keyframes on x and z axes, so overlayed animation played exact where root hip bone is in 3d scene except height (y axis). Thank you once again, guys. This conversation was very helpfull for me!