trying to make a simple animation......

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
Niteowl
Newbie
Posts: 22
Joined: Tue Apr 10, 2018 2:06 pm
Contact:

trying to make a simple animation......

#1 Post by Niteowl »

So, I was trying to make a very simple animation (more of a slideshow really.....

in the documentation I read this:


Image Statement With ATL Block

The second way to use ATL is as part of an image statement with ATL block. This binds an image name to the given transform. As there's no way to supply parameters to this transform, it's only useful if the transform defines an animation. The syntax for an image statement with ATL block is:

atl_image ::= "image" image_name ":"
atl_block

image eileen animated:
"eileen_happy.png"
pause 1.0
"eileen_vhappy.png"
pause 1.0
repeat


so, I tried to code the following

image whatever:
scene 1
pause .3
scene 2
pause .3
repeat

the whole thing doesn't work...I keep getting an error message that the program can't find a comma or the end of the line in the first indented line after the image statement.
The whole thing seems to work for other people but..... not for me
I don't get it...... what am I doing wrong? The images I'm trying to show were all defined , for example image 1 = "1.jpg", etc

Now, there is one way I can make my animation work...if I start with a label statement and at the end jump to label.... but of course that creates an infinite loop that crashes renpy if you try to get out of it

can anybody help? This is really frustrating.

Gotta get off the computer, I've been wasting the whole afternoon on this....but yeah, please help...I don't even care whether I complete my project or not, I just want to understand what I'm doing wrong.....
I mean, I know you can do some rather complex sprite animations...but I'm just trying to do a cheesy slideshow-animation for crying out loud...it shouldn't be this hard.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: trying to make a simple animation......

#2 Post by Imperf3kt »

Python requires indentation to work correctly.
Have you made sure your 'block' has been indented?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Niteowl
Newbie
Posts: 22
Joined: Tue Apr 10, 2018 2:06 pm
Contact:

Re: trying to make a simple animation......

#3 Post by Niteowl »

Imperf3kt wrote: Tue Sep 17, 2019 11:55 pm Python requires indentation to work correctly.
Have you made sure your 'block' has been indented?
I'm aware that indentation is important and I did check it....but ok, I"ll have another look

But isn't the indentation kind of automatic in some cases? Like after a ':' it automatically indents.... doesn't it? IS there some specific issue I have to look for in the example I posted?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: trying to make a simple animation......

#4 Post by Imperf3kt »

Some programs will automatically indent, yes (one of the reasons I still use editra)

I only mentioned it because I cannot see your indentation without your code being posted between code tags.

Can you copy/paste the exact error message as well?

At a guess, I'd say the error is because you're trying to use a "scene" instead of an image. Try substituting an image file name inside quotation.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: trying to make a simple animation......

#5 Post by rayminator »

you have the right and wrong

Code: Select all

image eileen animated:
"eileen_happy.png"
pause 1.0
"eileen_vhappy.png"
pause 1.0
repeat
it should look like this

Code: Select all

image run_animation2:
    "background/background3.JPG"
    2.0
    "background/background4.JPG"
    2.0
    "background/background2.JPG"
    repeat
then script it would like this

Code: Select all

show run_animation2
hope this helps you out a little

Niteowl
Newbie
Posts: 22
Joined: Tue Apr 10, 2018 2:06 pm
Contact:

Re: trying to make a simple animation......

#6 Post by Niteowl »

rayminator wrote: Wed Sep 18, 2019 9:07 am you have the right and wrong

Code: Select all

image eileen animated:
"eileen_happy.png"
pause 1.0
"eileen_vhappy.png"
pause 1.0
repeat
it should look like this

Code: Select all

image run_animation2:
    "background/background3.JPG"
    2.0
    "background/background4.JPG"
    2.0
    "background/background2.JPG"
    repeat
then script it would like this

Code: Select all

show run_animation2
hope this helps you out a little
I have the indentation in the actual code, it just didn't show on my post here
the editor I use automatically indents, that part was all good.....
I was trying to switch between scene so maybe that was an issue.....
but, when I put the image number in brackets, the program treats it like a character's statement and just puts it on the screen in the dialogue box instead of showing the image

anyways, I will experiment a little more later, the post gave me some ideas

Niteowl
Newbie
Posts: 22
Joined: Tue Apr 10, 2018 2:06 pm
Contact:

Re: trying to make a simple animation......

#7 Post by Niteowl »

rayminator wrote: Wed Sep 18, 2019 9:07 am you have the right and wrong

Code: Select all

image eileen animated:
"eileen_happy.png"
pause 1.0
"eileen_vhappy.png"
pause 1.0
repeat
it should look like this

Code: Select all

image run_animation2:
    "background/background3.JPG"
    2.0
    "background/background4.JPG"
    2.0
    "background/background2.JPG"
    repeat
then script it would like this

Code: Select all

show run_animation2
hope this helps you out a little
I typed your exact code in a new project I made for testing...... the code will simply ignore it all...if I add nothing else, nothing will happen
I added another scene and that was shown, but the program completely ignored any instruction to show the animation loop

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: trying to make a simple animation......

#8 Post by rayminator »

where are you putting the images in what folder?
my code works fine for me and I don't use this

Code: Select all

atl_image ::= "image" image_name ":"
atl_block
for my animations try it without this part to see if works

Post Reply

Who is online

Users browsing this forum: Google [Bot]