[SOLVED ]Catapult projectile problem

Get help using Construct 2

Post » Fri Dec 13, 2013 10:54 pm

Hi guys.

I have a project where I used the catapult game template.

PROBLEM
When I fire a projectile, and load another projectile to the catapult while the first projectile is in midair, the first projectile would not reach its destination and instead re-position itself on the catapult.

I hope you can help me. Thanks :)
majikk2013-12-16 20:48:01
B
2
Posts: 7
Reputation: 164

Post » Sun Dec 15, 2013 6:07 am

bump
B
2
Posts: 7
Reputation: 164

Post » Sun Dec 15, 2013 10:53 am

Guess this is a picking problem.

give the projectile an boolean variable HasBeenFired (or something else) and set it to false.

on released or shot set the boolean variable to true

When you try to reload the catapult be sure to check that only a projectile is loaded with variable hasbeenfired is not true.
(condition boolean is true inverted (right click - choose invert)
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 16, 2013 8:47 pm

Thank you!

This worked for me. Although I used two instance variables.majikk2013-12-16 20:47:45
B
2
Posts: 7
Reputation: 164


Return to How do I....?

Who is online

Users browsing this forum: Lancifer, Mayfly, thewisetree and 9 guests