[Behavior] LiteTween

Post your completed addons to share with the community

Post » Sat Jan 23, 2016 1:00 pm

Thank You!!
B
3
Posts: 1
Reputation: 177

Post » Fri Feb 19, 2016 4:57 pm

Hi,
I have an issue with LiteTween:
Image
If I click so the arrow will have to be between 180 and 360°, it makes one turn to the left (or more) instead of picking the shortest path.
Any idea how I could always have the shortest path between the start and target angles?
B
12
S
7
G
7
Posts: 446
Reputation: 4,268

Post » Fri Feb 19, 2016 5:19 pm

The problem is with angle(), not LiteTween. Try: (angle(arrow.X,arrow.Y,mouse.X,mouse.Y)+360)%360
ImageImageImage
B
67
S
19
G
122
Posts: 3,201
Reputation: 73,389

Post » Fri Feb 26, 2016 1:24 pm

Thank you for your reply :)
It doesn't always pick the short way between the two angles though :(
B
12
S
7
G
7
Posts: 446
Reputation: 4,268

Post » Sun Feb 28, 2016 12:26 am

@Coin-coin le Canapin

I don't have time to test it yet, but i have a guess about it. Maybe it happened when the first angle is a bigger number than the target angle. For example, tweening from 245 to 15? It is better to add 360 to the 15 if the target value is bigger from the source value. Could you test it and tell me how it goes?
B
32
S
5
G
1
Posts: 178
Reputation: 3,501

Post » Sun Feb 28, 2016 6:14 pm

can you add screenshots ?
B
7
S
3
G
1
Posts: 104
Reputation: 1,012

Post » Tue Mar 01, 2016 6:01 pm

I have 2 intro screens the same size at identical position covering the whole stage. I want to move up -400 px on a click event.
Active on Start is No for both.
Needed behavior:
1 - intro screen - on click event on introScreen, the introScreen moves y -400
2- intro is now out of screen.
3 - helpScreen - on click event on helpScreen, helpScreen moves up -400
4- regular stage is revealed.

The problem is that the click event on the introScreen starts both the introScreen and the helpScreen.

I have on the event sheet:
event
mouse - on left button Clicked on intro
Actions
intro - LiteTween Set target Y(absolute) to -400
intro - LiteTween Set target Y(absolute) to 300
intro - LiteTween Start from beginning ( force use current is Start from last recorded)


event
mouse - on left button Clicked on help
Actions
help - LiteTween Set target Y(absolute) to -400
help - LiteTween Set target Y(absolute) to 300
help - LiteTween Start from beginning ( force use current is Start from last recorded)

What am I doing wrong?
B
5
Posts: 15
Reputation: 255

Post » Wed Mar 02, 2016 6:52 am

@resdesign

Left button click fire for all overlapping sprite, in this case when you click on intro, the help below are clicked also eventhough it is being obscured by the intro. That is why both event fired up. You have to keep track of the current state of the UI and handle only the click accordingly.
B
32
S
5
G
1
Posts: 178
Reputation: 3,501

Post » Fri Mar 04, 2016 12:00 am

@lunarray Hey can you please re-upload? Download links not working anymore :( Thanks!
B
10
S
4
G
3
Posts: 163
Reputation: 2,507

Post » Fri Mar 04, 2016 12:28 am

@Allardje I was able to open both links. May be blocked on your end. Maybe try a different browser.
ImageImageImage
B
67
S
19
G
122
Posts: 3,201
Reputation: 73,389

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: Kev5454, Kyatric, Lordshiva1948 and 6 guests