Page 1 of 1

move after a period

Posted: Thu Nov 26, 2015 11:01 pm
by problème
Hello,
i have three images (imagined that the images are leaves) that follow a graphic curve do with the tool freehand.

Code: Select all

command leavesAreFalling
      move image "leaf1" to the points of graphic "way1" in 10 seconds without waiting
      move image  "leaf2" to the points of graphic "way2" in 10 seconds  without waiting
      --wait 4 seconds
      move image  "leaf3" to the points of graphic "way3" in 6 seconds without waiting
      send "FeuillesQuiTombent" to me in 10 seconds
end leavesAreFalling
I would want to do that "leaf3" begin to move after 4 seconds but when i use "wait" the moving block or are not fluide

Re: move after a period

Posted: Fri Nov 27, 2015 7:58 am
by SparkOut
You already seem to be using

Code: Select all

send "FeuillesQuiTombent" to me in 10 seconds
with success. Just make a separate handler for leaf3 and send that message in 4 seconds.

Re: move after a period

Posted: Fri Nov 27, 2015 11:37 am
by problème
Hello,
I tried to do this, it looks like work

Code: Select all

on OpenCard
   leavesAreFalling
   WaitLeaf
end OpenCard

command leavesAreFalling
   if fin is false then
      move image "leaf1" to the points of graphic "way1" in 10 seconds without waiting
      move image  "leaf2" to the points of graphic "way2" in 10 seconds  without waiting
      --move image  "leaf3" to the points of graphic "way3" in 6 seconds without waiting
      send "leavesAreFalling" to me in 10 seconds
   end if
end leavesAreFalling

command leavesAreFallingWithDelay
   move image  "leaf3" to the points of graphic "way3" in 6 seconds without waiting
   send "WaitLeaf" to me in 6 seconds
end  leavesAreFallingWithDelay

command WaitLeaf
   send " leavesAreFallingWithDelay" to me in 4 seconds
end WaitLeaf

thanks for the help