How do I Slding Shoot / Delay each Shoot

Get help using Construct 2

Post » Sun Apr 30, 2017 3:30 pm

Hey [quote="chrisinfinger"][/quote]

I need to make the model physic catapult create a delay of 1 second with each shot.

Example:
I would shoot the first pig after it would create a new pig and would release a new shot after 1 second.

you can help me? please
B
6
S
1
Posts: 31
Reputation: 414

Post » Mon May 01, 2017 1:36 am

I am not familiar with the "model physic catapult". Is this one of the templates that come with C2?

If not can you provide an example?
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
68
S
17
G
8
Posts: 637
Reputation: 9,420

Post » Mon May 01, 2017 4:05 am

chrisinfinger wrote:I


Is this same, C2 physic catapult.

I need it to stay in an angle of 0 to 20 degrees and have a delay in every shot of 1 second.
But I can not do it, I've been trying for 14 days and I can not do it.
do you can help me? please
B
6
S
1
Posts: 31
Reputation: 414

Post » Mon May 01, 2017 1:18 pm

The delay is easy, just put wait =1 and isAiming=1 at bottom of the "on any touch end" event.

I am terrible at calculating angle logic (and am minutes from heading to Disney World) but you will need to change the values in the "is in touch" event (angle(Touch.X, Touch.Y, CatapultBlock.X, CatapultBlock.Y)) to restrict the draw to your required angle... maybe someone with a better head for that can give you the correct values. You might want to ask just that part of of your question in the forums again "Correct logic to limit physic catapult to 0-20 degree firing angle".

If you need to reset the camera back to the catapult after it scrolls to the shot pig you can use a subevent under the "Else" portion of the "Is aiming" event that uses event "Is Physics sleeping" with action scroll to catapult.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
68
S
17
G
8
Posts: 637
Reputation: 9,420

Previous

Return to How do I....?

Who is online

Users browsing this forum: Artcadev, ignaciosimo, nickar and 48 guests