trying to make a simple animation......
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.
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.
trying to make a simple animation......
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.
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.
- 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......
Python requires indentation to work correctly.
Have you made sure your 'block' has been indented?
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
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Re: trying to make a simple animation......
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?
- 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......
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.
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
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
-
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: trying to make a simple animation......
you have the right and wrong
it should look like this
then script it would like this
hope this helps you out a little
Code: Select all
image eileen animated:
"eileen_happy.png"
pause 1.0
"eileen_vhappy.png"
pause 1.0
repeat
Code: Select all
image run_animation2:
"background/background3.JPG"
2.0
"background/background4.JPG"
2.0
"background/background2.JPG"
repeat
Code: Select all
show run_animation2
Re: trying to make a simple animation......
I have the indentation in the actual code, it just didn't show on my post hererayminator wrote: ↑Wed Sep 18, 2019 9:07 am you have the right and wrong
it should look like thisCode: Select all
image eileen animated: "eileen_happy.png" pause 1.0 "eileen_vhappy.png" pause 1.0 repeat
then script it would like thisCode: Select all
image run_animation2: "background/background3.JPG" 2.0 "background/background4.JPG" 2.0 "background/background2.JPG" repeat
hope this helps you out a littleCode: Select all
show run_animation2
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
Re: trying to make a simple animation......
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 happenrayminator wrote: ↑Wed Sep 18, 2019 9:07 am you have the right and wrong
it should look like thisCode: Select all
image eileen animated: "eileen_happy.png" pause 1.0 "eileen_vhappy.png" pause 1.0 repeat
then script it would like thisCode: Select all
image run_animation2: "background/background3.JPG" 2.0 "background/background4.JPG" 2.0 "background/background2.JPG" repeat
hope this helps you out a littleCode: Select all
show run_animation2
I added another scene and that was shown, but the program completely ignored any instruction to show the animation loop
-
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: trying to make a simple animation......
where are you putting the images in what folder?
my code works fine for me and I don't use this
for my animations try it without this part to see if works
my code works fine for me and I don't use this
Code: Select all
atl_image ::= "image" image_name ":"
atl_block
Who is online
Users browsing this forum: Google [Bot]