Bullet Behavior Instant Hit (like in classic)

Get help using Construct 2

Post » Tue Jun 12, 2012 3:12 pm

How can I achieve that? I need very fast bullets (and also invisible), but without Instant Hit feature (with just crazy speed, like 1000-2000) they will flew through objects without hitting them.
Help needed.
B
19
S
6
G
4
Posts: 171
Reputation: 2,507

Post » Tue Jun 12, 2012 3:47 pm

That's a nice use for the while loop!

while (bullet is not overlapping object)
move forward some distance.

Make sure you have a break statement in there somewhere, to prevent an infinite loop.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Tue Jun 12, 2012 3:52 pm

Wont work. Cause my bullet can fly 5-7x times more distance than width of any solids. For example: solid is on 15, i shot bullet on 0.
So it goes 0->10, then 10->20. It wont collide of overlap anything :(
Of, if it will work, then bullet speed wont be enough for my project. It should be instant, or very close to it.

Just tested it - its tooo sloooooow. And at preferrable speed it's as useless as just setting bullet speed.NugMan2012-06-12 15:56:48
B
19
S
6
G
4
Posts: 171
Reputation: 2,507

Post » Tue Jun 12, 2012 4:00 pm

Are you sure you're doing it right? make the bullet go in smaller increments if need be but if you are using a while loop properly the hit will always be instant.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Tue Jun 12, 2012 4:08 pm

Well, not exactly (poor me)
I've used
Bullet [Is Not Overlapping Solids] Move 1 px forward
Bullet [Is Overlapping Solids] Bullet Spawn - hole, Bullet - Destroy

Will try while loop. I just not familiar with it, sorry for not trusting, will go dig manual.NugMan2012-06-12 16:08:18
B
19
S
6
G
4
Posts: 171
Reputation: 2,507

Post » Tue Jun 12, 2012 4:13 pm

Whoa man! You rule!
B
19
S
6
G
4
Posts: 171
Reputation: 2,507


Return to How do I....?

Who is online

Users browsing this forum: LaroTaio, Radulepy, tarek2, TiagoCesar and 20 guests