How do I make vacuum?

Just started using Construct 2? Post your questions here

Post » Mon Mar 07, 2016 11:46 pm

Hi everybody

Do you know tomblepop? It was an arcade game where with a vacuum youTrap monsters.
So h ow can i create a thing like it?

Sorry for the sintax error brut i am Italian and the keyboard tablet too.
B
3
Posts: 6
Reputation: 187

Post » Tue Mar 08, 2016 12:27 am

It's almost a regular platformer shooting/fighting game
Your vacuum weapon has a very limited range (almost a sword) - so here you just check if your opponent is close enough, but the dying animation is a little bit different.
And when you release your enemies again it's a weapon with some (a lot of) behaviours attached to your big bullets you create (a little bit like the turtles in Super Mario).

Here is a fighting tutorial that is long but will help you a lot
https://www.youtube.com/watch?v=Vwky6rTkAGM

And here an old school 8bit platformer tutorial
https://www.youtube.com/watch?v=Yr-QIUm ... DRiqQZBTWM

  • 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 1:12 am

Most of that will be handled with animations, but the move function could be handled a few ways.

You could use LERP when the bad guys overlap a vacuum hitbox sprite.

"badguy" is overlaping "hitbox" > set X to (self.X, player.X,5*dt)
set Y to (self.Y, player.Y,5*dt)

Adjust 5 in 5*dt to a number that fits your sprite size and scale, it's the speed the bad guys will move.

Or you could use bullet behavior on the badguys, which is closer since you can control acceleration. Set the default speed to 0 and the acceleration to about half what speed will be. (say 30?)
now when the bad guy overlaps, you can move it toward the player with increasing speed as they are trapped in the vacuum longer. For this, I recommend an invisible control sprite, since you'll need to control the angle of the badguys, and you may not want to spin the actual animated sprite. A control sprite is really recommended for most actors in a platformer with any complexity.

Check out some platform tutorials if you're lost on the basics, but I'm happy to help as well.

In the case of bullet behavior:
"BadguyController" is overlapping "Hitbox" > set angle toward (player.x, player.y)
set bullet speed to 60
B
17
S
7
Posts: 21
Reputation: 1,711


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest