A Slingshot Mechanic

Get help using Construct 2

Post » Sun Dec 06, 2015 9:21 am

I'm looking into figuring out how to accomplish the action of a slingshot pull -> launch mechanic.

These are the steps:
1) Player mouse clicks down (holds down) on the sprite object
2) Player moves cursor away/around sprite object
3) An indicator of direction/force is shown to inform the player of what direction/how far the sprite object will travel
4) Player unclicks the mouse
5) Sprite object flies off in determined direction with indicated force
6) Sprite object bounces off of walls/objects until its velocity runs out

I want to say that I am just surprised at how far I've gotten with creating working game builds using Construct 2. I have no idea how people can use 'That other 2D game engine with the G and M words'. It just made me crazy even following a tutorial.
B
222
S
124
G
8
Posts: 144
Reputation: 22,114

Post » Sun Dec 06, 2015 10:08 am

You mean like the template-catapult example shipped with Construct2?
Searching the forum for angry bird will get you a lot of hits..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 07, 2015 12:04 am

OK, I was able to get the slingshot mechanic working using the 'catapult game' template. Now I'm looking to change things with the physics and such.

1) Once the player 'lets go', the sprite object with slide across the layout like a puck on an air hockey table, hitting other sprite objects and ricocheting off of walls.
2) Gradually, the sprite object loses velocity over time (would like to be able to adjust this for different sprite objects)
3) Once the sprite object comes to a complete stop, the player is capable of performing the 'slightshot' mechanic again on it.

This is the point where I'm not sure what to do. I thought the 'slingshot' mechanic wasn't working with my sprite object until I changed its properties. Is it better to change the sprite object's properties or to change things in the Events?
B
222
S
124
G
8
Posts: 144
Reputation: 22,114

Post » Thu Dec 10, 2015 11:44 pm

Now that I have the 'slingshot' mechanic working that allows the sprite object to fly and bounce around the layout hitting other objects, I'm looking to have the catapult sprite reset its location to where the Mario sprite object ends up after it loses all speed. I also want the screen to shake whenever the Mario sprite object hits the other sprite objects.

Image

Any help with this would be appreciated.
B
222
S
124
G
8
Posts: 144
Reputation: 22,114


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests