How do I

Get help using Construct 2

Post » Sun Feb 14, 2016 4:39 pm

1 system isaiming = 1 pig set position to catapult block ( image point 0)
system scroll to catapult block
2 touch is in touch pig set angle to angle ( touch.X, touch.Y, catapultblock.X, catapultblock.Y) degrees
pig move min(distance( touch.X, touch.Y, catapultblock.X, catapultblock.Y / 3,45) pixels at angle self angle+180
3 touch on any touch end system set is aiming = 0

i delet the behavior physics on the pig and add bullet

Voila, now i want to know how to after the first fire make spawn another pig and be able to fire immediatly after
B
4
Posts: 15
Reputation: 232

Post » Sun Feb 14, 2016 4:39 pm

1 system isaiming = 1 pig set position to catapult block ( image point 0)
system scroll to catapult block
2 touch is in touch pig set angle to angle ( touch.X, touch.Y, catapultblock.X, catapultblock.Y) degrees
pig move min(distance( touch.X, touch.Y, catapultblock.X, catapultblock.Y / 3,45) pixels at angle self angle+180
3 touch on any touch end system set is aiming = 0

i delet the behavior physics on the pig and add bullet

Voila, now i want to know how to after the first fire make spawn another pig and be able to fire immediatly after

edit: sorry for double post
B
4
Posts: 15
Reputation: 232

Post » Sun Feb 14, 2016 4:56 pm

If you want to have more than one pig you need to be able to tell the system which pig is actualy flying and which is at the catapult.

You will need to reset the "isaiming" to 1 after the shoot but without affecting the first pig.
Than you can just spawn a new pig at the catapultsblock position.
B
7
S
2
Posts: 56
Reputation: 583

Post » Sun Feb 14, 2016 5:10 pm

ok how i reset the isaimin 1 without afffecting the first pig? i did :
system is aiming = 0 system reset global variable to 0
on any touch end catapult block spawn pig
but i think the system is aiming to 0 and then immediatly to 1 and the pig im firing can t fly, i don t know how to don t affect the pig who is supposed to be fired.
B
4
Posts: 15
Reputation: 232

Previous

Return to How do I....?

Who is online

Users browsing this forum: SneakyHands and 4 guests