I recommend reading the Construct wiki. It helps a lot understanding the concepts of "tick based" and "time based". The key to time based actions is "TimeDelta". http://sourceforge.net/apps/mediawiki/construct/index.php?title=TimeDelta
Just in case you're curious, there's another way to move something over time by combining "lerp" with "TimeDelta".
lerp(a, b, t) interpolates between a and b at t, with t ranging from 0 to 1. t=0 results in a, t=1 results in b.
If you add TimeDelta to a zero-initialised variable on every tick, it will be 1 after one second. To let it reach 1 after two seconds, you would add '0.5 * TimeDelta' instead.
This would move the sprite horizontally from 200 to 100 in two seconds (pseudo code):
+ myVariable less than 1
-> Add 0.5 * TimeDelta to myVariable
-> Set Sprite.X to lerp(200, 100, myVariable)
EDIT: And if this is too confusing, it might even give you more accuracy if you'd let myVariable count to the needed seconds. But then you need to divide myVariable by the correct number in "lerp". This example would move horizontally from 64 to 211 in 3 seconds:
+ myVariable less than 3
-> Add TimeDelta to myVariable
-> Set Sprite.X to lerp(64, 211, myVariable / 3)tulamide2012-06-06 17:38:52