Page 1 of 1

Total Timer Tantrum!!!

Posted: Wed Nov 13, 2019 12:21 am
by 1uv3
Timers are RIDICULOUS to use intuitively. Seems the only way to get anything solved is by having Hopki or Tony come in to save the day time and time again......so here is another one :D

I have an object. I would like it to make 4 moves on it's own after the object loads. This should be a simple task.....however, THIS my dear friends....is a feat of madness.

If there was an "at end of action" hook.....then this would be easy to do.....but this is simply not the case and not the first time I have wined about this same issue :D

Here is an example of what I am trying to do:
.
TIMER-UNLOGIC.jpg
TIMER-UNLOGIC.jpg (45.85 KiB) Viewed 1019 times
.
As you can see in the image, I would like the object to make 4 moves. I have tried every INTUITIVE logical possibility with no success.

Basically, after the tour loads, the object appears, and then moves to the 4 locations and then stops. THERE HAS GOT TO BE an easier way to achieve such a simple task.....but I have not found it.

Hopki? Tony? :lol:

Re: Total Timer Tantrum!!!

Posted: Wed Nov 13, 2019 1:04 am
by 1uv3
By the Gods of Asgard.....I got it!!!!

WOOOOOHOOOOOOOOOO!!!!!!

Holy CRAP! That was a mind boggler to say the least.

I will post a video of what I did after I create a video so that I don't forget how to do it :-)

AAaaaand here is the vid :-) https://youtu.be/sCDBP3FPGk0

Re: Total Timer Tantrum!!!

Posted: Wed Nov 13, 2019 5:35 pm
by Hopki
Hi,
I have moved this to the skins forum.
As you have a numbered variable you can use this with just one timer.
Please see the attached project.
I have two timer projects in this one skin.

The first is using the variable "move1" and the other "move2".
Rectangle Red is being moved by Move Timer Red
The Red rectangles Position logic block looks like this:

1.png
1.png (80 KiB) Viewed 973 times

The timer, Move Timer Red has the actions:

2.png
2.png (33.35 KiB) Viewed 973 times

So with every deactivation, it counts up by 1.
The next action is:

3.png
3.png (35.71 KiB) Viewed 973 times

But has the action filter:

4.png
4.png (25.38 KiB) Viewed 973 times

So when the count gets to 4 the Set Value action removes the Timeout value and stops the timer.




The second project in the skin uses the rectangle with the ID Green and keeps on moving around in circles.
The rectangle Green Position logic block looks like this:

5.png
5.png (79.16 KiB) Viewed 973 times

The Move Timer Green has the actions:

6.png
6.png (33.61 KiB) Viewed 973 times

And to loop the variable number:

7.png
7.png (39.78 KiB) Viewed 973 times

To best describe this the Mod(%) is a circular calculation so when it gets to 4 it will loop back to 0.
Unlike the first project, there is no need to stop the timer.

Also if you wanted, with the first project you could use a button to start it.
To do this you would set the Move Timer Red's properties to timer Type Manual.

Then add a rectangle to act as your button with the actions:

8.png
8.png (36.73 KiB) Viewed 973 times

This sets the Timeout value to start the timer.
The next action is:

9.png
9.png (37.16 KiB) Viewed 973 times

This is to reset the variable number back to 0, but this has an action filter so it can only happen when the number is at 4.

10.png
10.png (20.48 KiB) Viewed 973 times

When you press the button it starts the timer and when it gets to the count of 4 it will stop.
Pressing the button will reset the variable number back to 0 and start the timer again.

Regards,
Hopki

Re: Total Timer Tantrum!!!

Posted: Wed Nov 13, 2019 8:16 pm
by 1uv3
Hopki,

How in the hell do you remember all of this? Seriously. Do you have to open up a book of spells to reference from or do you just think about what you are trying to do, and the answer magically comes to you? Can you please explain to me how you come up with these solutions?

You never cease to amaze me :-)

Thank you for your help and explanation Hopki! I will open it up and see if I can decipher it all :shock: haha

Re: Total Timer Tantrum!!!

Posted: Thu Nov 14, 2019 7:20 am
by Tony
1uv3 wrote:
Wed Nov 13, 2019 8:16 pm
How in the hell do you remember all of this? Seriously. Do you have to open up a book of spells to reference from or do you just think about what you are trying to do, and the answer magically comes to you? Can you please explain to me how you come up with these solutions?
I sort of envisage this is how Hopki works!

Hopki-Sorcerer.jpg
Hopki-Sorcerer.jpg (3.2 MiB) Viewed 932 times

Re: Total Timer Tantrum!!!

Posted: Thu Nov 14, 2019 9:55 am
by 1uv3
AHA!!! I knew there was something different about the two of you :lol: :lol:

Re: Total Timer Tantrum!!!

Posted: Thu Nov 14, 2019 11:43 am
by Tony
That's Hopki, this is me trying to work out the same solution!

Hopk-Tonyi-Sorcerer.jpg
Hopk-Tonyi-Sorcerer.jpg (2.39 MiB) Viewed 920 times

Re: Total Timer Tantrum!!!

Posted: Thu Nov 14, 2019 3:22 pm
by Hopki
:lol: :lol: :lol: :lol: :lol: :lol:
Thats so funny.

Re: Total Timer Tantrum!!!

Posted: Thu Nov 14, 2019 5:47 pm
by soulbrother
Hey Guys, you made my day!!

:P

Re: Total Timer Tantrum!!!

Posted: Fri Nov 15, 2019 9:49 pm
by 1uv3
Haha! That's great!

Well, if that is you guys, then this is me
stupidity_at_work.jpeg
stupidity_at_work.jpeg (13.01 KiB) Viewed 871 times

Re: Total Timer Tantrum!!!

Posted: Sun Nov 17, 2019 4:28 am
by Tony
:lol: :lol: :lol: