Creating an ATL curve for throwing a baseball?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
newbiemate
Regular
Posts: 85
Joined: Tue Dec 19, 2017 1:36 pm
Contact:

Creating an ATL curve for throwing a baseball?

#1 Post by newbiemate »

I've used ATL to move things across the screen from point A to point B, using the linear keyword.

If I want to throw a baseball, how do I create an ATL that does the same thing as linear, except the trajectory is curved and it also spins the ball image?

User avatar
Donmai
Eileen-Class Veteran
Posts: 1958
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Creating an ATL curve for throwing a baseball?

#2 Post by Donmai »

You can do it using ATL spline motion: https://www.renpy.org/doc/html/atl.html ... -statement
This spline motion editor may be useful: viewtopic.php?p=367520#p367520
As for the spinning ball, you can define it as an ordinary ATL animated image.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

newbiemate
Regular
Posts: 85
Joined: Tue Dec 19, 2017 1:36 pm
Contact:

Re: Creating an ATL curve for throwing a baseball?

#3 Post by newbiemate »

Thanks, that helped. Is there a way to declare a specific xpos and ypos, instead of using align for the spline motion?

Newprogrammer
Newbie
Posts: 17
Joined: Sat Oct 20, 2018 10:28 am
Contact:

Re: Creating an ATL curve for throwing a baseball?

#4 Post by Newprogrammer »

If i'm not mistaken you can substitute the align statement with a pos statement without any problem.
As far as I know these two kind of statement are basically the same thing.
With pos statement you can work with x and y axis at the same time, infact you can do something like this: pos (Xo,Yo); remember with pos statement you need to specify the number of the pixels of the screen while with align you have to explicit the portion of the screen. Basically with pos statement you have to input an integer while with align statement you have to input a fraction.

If you want you can explicit the position of the x and y in two different moment with xpos and ypos.

I don't know if this fully answer your question...

newbiemate
Regular
Posts: 85
Joined: Tue Dec 19, 2017 1:36 pm
Contact:

Re: Creating an ATL curve for throwing a baseball?

#5 Post by newbiemate »

Thanks! I understand now. I was trying to do xpos/ypos on the linear statement and was getting errors, but it should have been pos!

Post Reply

Who is online

Users browsing this forum: Kocker