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
29
S
7
G
3
Posts: 361
Reputation: 6,187

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
29
S
7
G
3
Posts: 361
Reputation: 6,187

Post » Thu Jul 26, 2012 2:07 am

The sound clip is going nonstop for some reason! Help!
B
29
S
7
G
3
Posts: 361
Reputation: 6,187

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
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Thu Jul 26, 2012 2:25 am

Ok thanks!
B
29
S
7
G
3
Posts: 361
Reputation: 6,187


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests