Physics question - blocking/slowing enemies

Get help using Construct 2

Post » Fri May 25, 2012 6:47 pm

Hello again,

1.) So I've gotten the top-down physics to work -relatively- well, though even with highest friction and dampening settings, large objects with high density still slide around a little too much. Is there a way to make items not seem like they are on ice in top-down view?

2.) Also, is there a way to make an enemy slow down when pushing an object? So for example, if the player shoves a sofa in front of a zombie, and the zombie runs into it to get to the player, right now the zombie just plows through it and shoves it out of the way. I'd rather like to have the couch slow the zombie down as the zombie 'struggles' to get past it. Zombies currently use the bullet behavior for movement and every tick they rotate towards the player.

3.)Further, is there a way to make an object just block other moving objects all-together while remaining moveable? For example, a fridge that the player can push in front of a doorway that blocks zombies from entering.

I've been looking through tutorials and examples, but haven't really found much in regards to these types of things.

4.) Another problem I am having is figuring out how to properly apply impulses. Say I have a giant monster. When he collides with aformenioned sofa, I want the sofa to go flying, and I figure applying an impulse would work. However, I am unable to figure out how to apply an impulse at an angle depending on the angle of the monster. Basically I want the sofa (or other furniture) to essentially be thrown away from the monster upon contact.

Any information/suggestions/feedback is greatly appreciated!

Thanks again!
B
19
S
6
G
5
Posts: 98
Reputation: 4,484

Post » Fri May 25, 2012 9:26 pm

top-down?... why physics?
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Fri May 25, 2012 10:55 pm

Right now, with the current physics, it makes the environment more dynamic and interesting for game play. It's fun watching zombies toss aside chairs and tables to get at the player, or the player pushing a fridge in front of a volley of enemy projectiles. I just want to improve upon the functionality as well as expand my own knowledge of how these all work.

Also, why not? Top-down physics are even included in one of the examples that ship with the software.supergodjesus2012-05-25 23:27:41
B
19
S
6
G
5
Posts: 98
Reputation: 4,484

Post » Sat May 26, 2012 12:46 am

Alright, I hadn't tried this example, makes more sens when you interact with the little HTML5 logo.

for 1 and 2 I'd say you can always play around with VelocityX and VelocityY
They are vector component you can get and set as you want.

for 3 you can dynamically switch the blocked door to immoveable depending on the context (eg: there's a fridge in front).

for 4 apply impulse at angle angle(monster.X,monster.Y,sofa.X,sofa.Y)
Yann2012-05-26 00:46:34
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346


Return to How do I....?

Who is online

Users browsing this forum: HugeCube, imnotspecial, tomi71, totoe, Yahoo [Bot] and 19 guests