Need help with game.

For questions about using Classic.

Post » Sat Jan 26, 2008 9:16 pm

Well basically, I tried to make a wall so that the "zombies" couldn't get trough it. It worked well when the zombies came from the right.
But when they are moving from left to right they just pass the wall without anything happening.

Maybe hard to explain here is a cap.
http://upload.d2k5.com/files/1201382081_zombie_.rar
B
2
G
4
Posts: 16
Reputation: 1,082

Post » Sun Jan 27, 2008 1:49 pm

Thats simple becouse if they are overlaping with wall they go right so if they collide from left it wont change anything :P
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Sun Jan 27, 2008 2:47 pm

I don't think I really understand what you mean :p
B
2
G
4
Posts: 16
Reputation: 1,082

Post » Sun Jan 27, 2008 5:01 pm

You dont know how you made zombie "bounce" from the wall? Analyze code !
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Sun Jan 27, 2008 7:57 pm

Haha I still don't understand :p I am a noob.
B
2
G
4
Posts: 16
Reputation: 1,082

Post » Sun Jan 27, 2008 10:32 pm

the link doesn't seem to be working for me but taking hints from the conversation already going on, i presume that the events are made such that the zombie will always go towards the right

what needs to be done here is to create additional conditional checks

+ is for conditions
- is for actions

+ zombie collides with wall
+ zombie is facing towards the right
- set the direction to face left (or bounce towards the left if you can)

+ zombie collides with wall
+ zombie is facing towards the left
- set the direction to face right (or bounce ...)

a little advice for future problems:
whenever you are stuck with a problem, try to break down as much as possible or to the point that you can understand the problem well enough to tackle the smaller pieces that make up the entire problem
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Sun Jan 27, 2008 10:37 pm

Vinny its 360 degree movement :P, so it won't work always.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Mon Jan 28, 2008 2:33 am

set direction to face right ~ set direction to 0 degrees
set direction to face left ~ set direction to 180 degrees

it'll work ;)
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Mon Jan 28, 2008 8:15 am

Well i found simpler way:
+When Zombie collides with Wall
-Zombie:Rotate 180 degrees clockwise

And zombie wont be bouncing of walls but only attacking them xD
B
4
S
2
G
4
Posts: 719
Reputation: 2,938


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest