GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Need help with a sniper game

I am new to games and and I have made my game! But I was wondering would it be posible to detect if you click on the enemy's head or body? Basically the game is a bunch of stickmen walk across the screen and you have to shoot them before they get to the other side. I would also like to know how to make a score, e.g 100 points for headshot 50 points for body, I also have other enemy types that I want to be worth diferent points

Summary:
1. How can I make a game detect where I click on a actor
2. How can I make a score for diferent shots (headshot, body shot)

Comments

  • JPGamesFactoryJPGamesFactory Posts: 174Member, PRO

    Create you stick man. Than create two actor, one for the head and one for the body, change Alfa to 0 and constraint it to the stick man.
    Then program if touch ... Assign points

  • CodeMonsterCodeMonster ACT, AustraliaPosts: 1,078Member

    if you want an endless wave of stickmen, not just 1, then the method @JPGamesFactory‌ mentioned will not work.
    i have a template over at gsinvention which has all the features you mentioned above, the whole template has 0 load times and has the points and headshot/bodyshot feature.

    the body and head shots are detected within the one actor, so there are no additional actors being constrained onto the enemy AI.

    link if your interested: (if not allowed, please remove link moderators)
    http://www.gsinvention.com/store/p77/Advanced_Sniper_Game.html

    video:

    ::how i detected the head and body shots::
    basically i detected when touch is pressed, and the players finger position y is on the head and no where els, using decimals, i tracked where the bullet was and detected whether or not it was a head shot.
    the same went for the body, and it works to perfection.

  • JPGamesFactoryJPGamesFactory Posts: 174Member, PRO

    Yes , Codemonster give you a perfect solutions

Sign In or Register to comment.