How do I spawn bullet case like this ?

Get help using Construct 2

Post » Mon Mar 21, 2016 9:56 am

Hi, I've managed to make my character to spawn bullet cases but I want them to bounce realistic when touching the floor without having to use the physics behavior. What I mean is when the bullet case touches the floor, it bounces up 2 or 3 times and then remains still on the floor. Does anyone have an idea on how to make this happen ?

Here is a link with what I achieved so far:
https://www.dropbox.com/s/gw31o30zmeznb ... .capx?dl=0
B
36
S
10
G
9
Posts: 212
Reputation: 6,945

Post » Mon Mar 21, 2016 10:39 am

You could give your bullet shells an instance variable
set them random to 2 or 3 bounces
So e.g. if it hits the ground the first time = check in which state the shell is and depending on that let it bounce

Just a notice: Here is a tutorial with physics bullets shells
https://youtu.be/7N59KchDsKM?t=319

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Mon Mar 21, 2016 12:17 pm

Wel said @fm4fanAT
B
2
Posts: 2
Reputation: 154

Post » Mon Mar 21, 2016 8:23 pm

@anty21ro
You only have to set the "BulletCase"->Behaviors->Rotate->Accelaration , to 0. and it looks more realistic.

Or make to the Bullet Case and the Ground a Physic Behavior and delete the rotate Behavior.

You can check out how i have made it in my game: https://www.dropbox.com/s/bldu01pknr6tt ... .capx?dl=0
there the bullet shells bounce a little bit.
(I`m a noob ;) )
(only playabel with a Xbox controller)
B
9
S
1
Posts: 22
Reputation: 473

Post » Mon Mar 21, 2016 10:32 pm

@fm4fanAT
Ok, I will try that. Thanks for the link but as I said, I don't want to make use of the physics behavior.

@Jomnitech
You were right, I forgot to set the acceleration to 0, now it looks better.
Unfortunately I don't have a gamepad so I can't control the player. Your game looks great, I like the graphics.
B
36
S
10
G
9
Posts: 212
Reputation: 6,945

Post » Tue Mar 22, 2016 6:16 am

In my Game i have make it with Physics. But you dont want to use it, so you do not Need to look at my game.
B
9
S
1
Posts: 22
Reputation: 473

Post » Tue Mar 22, 2016 6:44 am

example for fraction:
viewtopic.php?t=124321&p=883505#p883505

example for bouncing:
how-do-i-create-a-swing-in-the-ball_t124206?start=30

no physics were involved.
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Tue Mar 22, 2016 11:04 am

Thanks for the examples alextro
B
36
S
10
G
9
Posts: 212
Reputation: 6,945


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi, marc254, tarek2 and 21 guests