How do I make a moving platform stop based on period

Get help using Construct 2

Post » Fri Oct 28, 2016 5:36 pm

im trying to make a grid of moving platforms that stop when they meet up with each other.

it looks like this
column 1 and 3 have a period of 5 and a magnitude of 250
column 2 and 4 have a period of 10 and a magnitude of 500
both have "stop" as an instance variable

if "stop"=0 ----> set sine inactive, wait 1 second, set "stop"=1
if "stop"=1 ----> set sine active, wait 5 seconds, set "stop"=0

instead of moving 5 seconds, stopping 1 second, moving etc. It moves and then stutters. the rest of the game runs smooth, but the platforms do not.
B
11
S
2
Posts: 7
Reputation: 591

Post » Fri Oct 28, 2016 9:58 pm

You are using wait incorrectly. Wait will not keep the event from running every tick, it just delays the action.

Also, you will probably need to add "else" to the second event, to make a proper toggle.
Mistakes were made.
B
60
S
30
G
132
Posts: 1,931
Reputation: 74,339

Post » Mon Oct 31, 2016 4:56 pm

how would i make a delay then? because thats my real issue here
B
11
S
2
Posts: 7
Reputation: 591

Post » Mon Oct 31, 2016 5:12 pm

Use the Timer behaviour.
ImageImageImage
B
71
S
22
G
288
Posts: 3,858
Reputation: 158,422


Return to How do I....?

Who is online

Users browsing this forum: kelany and 10 guests