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
10
S
1
Posts: 7
Reputation: 466

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
53
S
27
G
114
Posts: 1,695
Reputation: 64,438

Post » Mon Oct 31, 2016 4:56 pm

how would i make a delay then? because thats my real issue here
B
10
S
1
Posts: 7
Reputation: 466

Post » Mon Oct 31, 2016 5:12 pm

Use the Timer behaviour.
ImageImageImage
B
71
S
22
G
247
Posts: 3,753
Reputation: 137,552


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests