How do I make a whack a mole type of Game

Get help using Construct 2

Post » Thu Mar 03, 2016 10:10 am

How do I make a whack a mole type of Game using the hammer. I cannot make the hammer work.
B
7
S
2
G
1
Posts: 22
Reputation: 1,074

Post » Thu Mar 03, 2016 10:48 am

Can you be more specific? Or show your capx?

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Thu Mar 03, 2016 11:12 am

you juste need to make in the events when sprite "hammer" is overlapping a sprite "mole", then > sprite "hammer" start animation "whack"
B
37
S
15
G
7
Posts: 1,681
Reputation: 9,614

Post » Thu Mar 03, 2016 5:48 pm

@jamal12

hi there, for example you could make the basic structure of a whack a mole game (like 9 holes in 3x3). Then have a global variable = 'spawnMole'. Then have a piece where if variable = 1 spawn the mole sprite on hole 1, if 2 spawn on hole 2, etc. You can fadein/out also maybe? Maybe look into if you can change the mouse pointer to like a hammer sprite or something. On click, the mole fadeouts and you gain 100 score.

Maybe 'something along these lines' can help you ;).
B
6
Posts: 50
Reputation: 367

Post » Tue Mar 08, 2016 9:59 am

the mole and the hole and the spawnner is not he problem I may even use bubble examples but how to hit these bubbles or moles, usually with touched object but how to make a hammer appear when you hit the mole or the bubble?
B
7
S
2
G
1
Posts: 22
Reputation: 1,074

Post » Tue Mar 08, 2016 10:10 am

With whack a mole games you usually have the hammer attached to your mouse.X and Mouse.Y (every tick).
And when you click you start the hammer down animation.

On mobile its something like
touch > on touched object Mole | system > create object > Hammer x=Touch.X and Y=Touch.Y
this should start an animation where the hammer falls and after animation end destroy hammer (maybe with a wait action in between)

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Tue Mar 08, 2016 10:54 am

fm4fanAT you're a genius man it work I am hitting my enemies over the head BAM. thanks. been looking for this for days and days
B
7
S
2
G
1
Posts: 22
Reputation: 1,074


Return to How do I....?

Who is online

Users browsing this forum: AllanR, Artcadev and 14 guests