Moving Left But not Right

For questions about using Classic.

Post » Sat Sep 04, 2010 3:41 am

I am currently creating a puzzle game where you can move left through some blocks but not right. Currently I have a system where if you press the right key the block becomes solid and when you press the left key the block becomes un-solid. The problem is that if you are overlapping the block and press the right key you teleport.
http://dl.dropbox.com/u/2867484/OneWay.cap
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Sat Sep 04, 2010 8:12 pm

[quote="AfterShock":16neye3y]I am currently creating a puzzle game where you can move left through some blocks but not right. Currently I have a system where if you press the right key the block becomes solid and when you press the left key the block becomes un-solid. The problem is that if you are overlapping the block and press the right key you teleport.
http://dl.dropbox.com/u/2867484/OneWay.cap[/quote:16neye3y]

this woorks for me:

+ DirectionBlock: Value 'Direction' Equal to 0

+ MouseKeyboard: Key Right arrow is down
+ playerCol: overlaps DirectionBlock : offset (10,0)
-> DirectionBlock: Set collision mode to None

+ MouseKeyboard: On key Left arrow pressed
-> playerCol: Deactivate Platform movement

+ MouseKeyboard: [negated] Key Left arrow is down
+ System: Trigger once
-> playerCol: Activate Platform movement
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sun Sep 05, 2010 3:30 am

[quote="ranma":2kz93p3t][quote="AfterShock":2kz93p3t]I am currently creating a puzzle game where you can move left through some blocks but not right. Currently I have a system where if you press the right key the block becomes solid and when you press the left key the block becomes un-solid. The problem is that if you are overlapping the block and press the right key you teleport.
http://dl.dropbox.com/u/2867484/OneWay.cap[/quote:2kz93p3t]

this woorks for me:

+ DirectionBlock: Value 'Direction' Equal to 0

+ MouseKeyboard: Key Right arrow is down
+ playerCol: overlaps DirectionBlock : offset (10,0)
-> DirectionBlock: Set collision mode to None

+ MouseKeyboard: On key Left arrow pressed
-> playerCol: Deactivate Platform movement

+ MouseKeyboard: [negated] Key Left arrow is down
+ System: Trigger once
-> playerCol: Activate Platform movement[/quote:2kz93p3t]
But then you can't jump on the blocks like you need to be able to.
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Sun Sep 05, 2010 6:22 am

Try this it will eliminate the teleport.
[code:1kvgwug0]+ DirectionBlock: Value 'Direction' Equal to 0

+ MouseKeyboard: On key Right arrow pressed
+ playerCol: overlaps DirectionBlock : offset (10,0)
| -> DirectionBlock: Set collision mode to None
|
+ MouseKeyboard: On key Left arrow pressed
| -> DirectionBlock: Set collision mode to Per Pixel
|
| + playerCol: playerCol overlaps DirectionBlock
| -> DirectionBlock: Set collision mode to None
[/code:1kvgwug0]
B
79
S
24
G
54
Posts: 4,740
Reputation: 40,743

Post » Sun Sep 05, 2010 11:56 pm

Thanks for the help, I can't even drag and drop code properly.
B
7
S
2
G
3
Posts: 139
Reputation: 2,331


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests