randomizeObjPositions() and Definable Drop Targe

Help for using specific functions

randomizeObjPositions() and Definable Drop Targe

Postby Kataleena » Tue Dec 22, 2015 12:04 am

Hi,

I'm using a Definable Drop Target question, that has a true or false box the user drags 4 answers into, the answers are then made invisible. I have used this before without issue. However, I'm using randomizeObjPositions() for the 4 answers for the first time. Its all working expect for the reset question button i'm using, the answers don't always reset to the anchor positions, one or two answers might still be hidden or one might be hiding behind another in an anchor position . I cant find a pattern. I have traced it to the action "reset object: Definable Drop Target - false" and "reset object: Definable Drop Target - true", if i remove these from the button, it all works but obviously I need to reset the question and everything I have tried so far has not worked. Any help would be appreciated. Kate
Attachments
Reset.PNG
Reset.PNG (18.38 KiB) Viewed 7704 times
Kataleena
 
Posts: 49
Joined: Sun Feb 23, 2014 10:05 pm

Re: randomizeObjPositions() and Definable Drop Targe

Postby Clifton » Tue Dec 22, 2015 1:27 am

I would try placing a media action "Timed Delay" AFTER EACH reset action. Try using a long delay like 1000ms and if that works then progressively reduce the delay to the smallest value that still produces the desired results.

My theory:
I think the reset actions may be conflicting with each other because these actions may internally use delays themselves. However, some actions when run back to back cause delay conflicts. So if we can force each one to complete independent of the other and then finish the action sequence with the randomization and other stuff, it may all play well together.

NOTE:
Media "timed delay" actions do not work inside if/then or other control structures. However, in your case you are not using any of these control structures so the simple "timed delay" should work. Otherwise, you would have to use PowerPac functions to achieve the delays because PowerPac functions can delay effects inside any control structure.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: randomizeObjPositions() and Definable Drop Targe

Postby Kataleena » Tue Dec 22, 2015 6:30 pm

Hi Clifton

Thank you that seems to be working, I also put a small "times delay" at beginning, which it also seems to need if the button is click right after an answer is dropped.

Once again, your fast support is amazing.
Thanks
Kate
Kataleena
 
Posts: 49
Joined: Sun Feb 23, 2014 10:05 pm


Return to Function Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron