How do I make a bomb?

Get help using Construct 2

Post » Thu Jul 26, 2012 1:46 am

How do I make a bomb that explodes and destroys every enemy in a certain distance? InvaderX2012-07-26 01:47:08
B
30
S
8
G
3
Posts: 366
Reputation: 6,302

Post » Thu Jul 26, 2012 1:50 am

You can use the distance expression:

[code]+System - Compare two values: distance(Bomb.X, Bomb.Y, Enemy.X, Enemy.Y) < YOURDISTANCE
->Destroy Enemy
->Destroy Bomb[/code]
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jul 26, 2012 2:04 am

Hmmm Only works on direct contact.InvaderX2012-07-26 02:07:54
B
30
S
8
G
3
Posts: 366
Reputation: 6,302

Post » Thu Jul 26, 2012 2:07 am

The sound clip is going nonstop for some reason! Help!
B
30
S
8
G
3
Posts: 366
Reputation: 6,302

Post » Thu Jul 26, 2012 2:20 am

Probably because of how events work.

If the condition where you have an action "Play sound" executes each tick, then the sound will be played each tick.

Either add a "System: Trigger once while true" condition, either make sure the event's condition only execute once.

And as anytime you ask for help in the forums, since we can't guess your code, be sure to post a capx.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
278
S
104
G
86
Posts: 7,313
Reputation: 84,306

Post » Thu Jul 26, 2012 2:25 am

Ok thanks!
B
30
S
8
G
3
Posts: 366
Reputation: 6,302


Return to How do I....?

Who is online

Users browsing this forum: ColombageEnPLS, newt, Yahoo [Bot] and 2 guests