"Mob" Behaviour - Move Through the walls...

Discussion and feedback on Construct 2

Post » Wed Sep 14, 2011 4:02 pm

Guys,

Im trying to restrict a "mob" moviment in one single room in my game. Iput the bullet behaviour in mob and I made a single room with 4 walls. I created 4 "blockers" (4 sprite with solid behaviour and opacity 0) and overlap the room walls. When I start the game my mob walked through the walls...

Any Help or tip ?

Cheers

Amarcelo
"keep calm we have giant robots!"
B
22
S
5
G
5
Posts: 95
Reputation: 3,432

Post » Wed Sep 14, 2011 4:32 pm

You should test for collision between your "mob" sprite and either the wall or your "blocker".
When there is a collision, set mob acceleration and speed (bullet behavior actions) to 0, and so the mob will stop.

In this configuration, the solid behavior is useless, and you can remove it from the blockers.

From there you can choose what to do with your mob. You can, for example change its angle, and make it look like it "bounces" from the wall.Kyatric2011-09-14 16:32:58
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 » Wed Sep 14, 2011 4:47 pm

Kyatric,

Thanks for the help !!! Ill test the tip !

Cheers

Antonio
"keep calm we have giant robots!"
B
22
S
5
G
5
Posts: 95
Reputation: 3,432

Post » Wed Sep 14, 2011 5:21 pm

Works !!!

Thanks again !!!
"keep calm we have giant robots!"
B
22
S
5
G
5
Posts: 95
Reputation: 3,432


Return to Construct 2 General

Who is online

Users browsing this forum: zenox98 and 12 guests