Search found 88 matches

by Code Monkey
Mon Jun 18, 2012 9:40 pm
Forum: Ren'Py Questions and Announcements
Topic: What's wrong with this code! part 2!
Replies: 8
Views: 914

Re: What's wrong with this code! part 2!

You could just nest one within the other: if tell_loren == False: if dance == True: stuff There's no need to change the structure, the only problem is that briannavon is including one too many "if"s. if Dance and not tell_loren: blah Personally that's how I would write it too.
by Code Monkey
Sun Jun 17, 2012 10:30 pm
Forum: Ren'Py Questions and Announcements
Topic: "This constructor takes no argument" error
Replies: 1
Views: 412

Re: "This constructor takes no argument" error

Your constructors need two underscores on each side, looks like you only have one.
by Code Monkey
Sat Jun 16, 2012 10:10 pm
Forum: Ren'Py Questions and Announcements
Topic: Coding a function for showing a sequence of images
Replies: 3
Views: 1388

Re: Coding a function for showing a sequence of images

Ya that should work, and your other code too, check it out!

Code: Select all

init python:
    imgs = [111,112,113,121,122,123,131]
    for i in imgs:
        renpy.image(("insimg%d"%i,),
                            "insimg%d.png"%i)
I didn't test it so if something doesn't work, soz.
by Code Monkey
Fri Jun 15, 2012 8:37 am
Forum: Ren'Py Questions and Announcements
Topic: Making Springy Movement work
Replies: 4
Views: 938

Re: Making Springy Movement work

Doesn't look like the code is within a python block.
by Code Monkey
Fri Jun 15, 2012 5:09 am
Forum: Ren'Py Questions and Announcements
Topic: Coding a function for showing a sequence of images
Replies: 3
Views: 1388

Re: Coding a function for showing a sequence of images

I don't think you can pass file names to renpy.show, so you have to define the images ahead of time Here's an idea python: def period(coords, *args): for key in args: renpy.show('imageins%d'%key, at_list=[coords]) renpy.sound.play('bang.mp3') renpy.pause('1.0') label something: $ period(left, 0, 1, ...
by Code Monkey
Thu Jun 14, 2012 5:36 am
Forum: Ren'Py Questions and Announcements
Topic: Video Won't Work. Black Screen with Audio. (Solved)
Replies: 12
Views: 2110

Re: Video Won't Work. Black Screen with Audio.

Just gotta make sure the class is within a python block. You can move your import within the same block if you want init -2 python: import webbrowser class OpenYoutube(Action): def __call__(self): webbrowser.open_new('http://www.youtube.com') screen main_menu: tag menu imagemap: ground "Customizatio...
by Code Monkey
Thu Jun 14, 2012 5:28 am
Forum: Ren'Py Questions and Announcements
Topic: Saves being persisted even to new games [Solved]
Replies: 5
Views: 560

Re: Saves being persisted even to new games

Thanks a lot for the help PyTom!!! Would not have guessed that was the issue.
by Code Monkey
Wed Jun 13, 2012 10:52 am
Forum: Ren'Py Questions and Announcements
Topic: Saves being persisted even to new games [Solved]
Replies: 5
Views: 560

Re: Saves being persisted even to new games

Yes, like half the game is written with classes so objects are used extensively. So the solution would be to just instantiate the objects outside of init blocks? label start: python: thing = object() thing.field = 0 "[thing.field]" $ thing.field += 1 "[thing.field]"
by Code Monkey
Wed Jun 13, 2012 9:44 am
Forum: Development of Ren'Py
Topic: ui.interact bug, maybe?
Replies: 0
Views: 643

ui.interact bug, maybe?

Here's the process the creates the error: 1. Call a few screens the user can interact with 2. Make a call to ui.interact() 3. Try to close the game entirely, but press cancel. I get the following I'm sorry, but an uncaught exception occurred. While running game code: File "game/main.rpy", line 397, ...
by Code Monkey
Wed Jun 13, 2012 2:41 am
Forum: Ren'Py Questions and Announcements
Topic: Saves being persisted even to new games [Solved]
Replies: 5
Views: 560

Saves being persisted even to new games [Solved]

I am having a few issues with the saves. When I play through the game and save, everything is fine. But when I do the following I get problems 1. Continue to play through the game, don't save, then reload the game. The time of the reloaded game is the same as the time from when the game was not save...
by Code Monkey
Wed Jun 13, 2012 12:29 am
Forum: Ren'Py Questions and Announcements
Topic: Video Won't Work. Black Screen with Audio. (Solved)
Replies: 12
Views: 2110

Re: Video Won't Work. Black Screen with Audio.

You need to make an action, here's a very good link that will describe it. http://www.renpy.org/doc/html/screen_python.html#actions There's two ways you can go about doing this; make an action solely devoted to run that code; or make a more robust action that runs any function passed to its construc...
by Code Monkey
Wed Jun 13, 2012 12:03 am
Forum: Ren'Py Questions and Announcements
Topic: Scrollbar position in a viewport
Replies: 1
Views: 1606

Re: Scrollbar position in a viewport

Just using the code from as http://www.renpy.org/doc/html/screens.html#viewport an example screen viewport_example: side "c b r": area (100, 100, 600, 400) viewport id "vp": draggable True add "washington.jpg" vbar value YScrollValue("vp") xpos 1.0 You can change the position of the vbar with the xp...
by Code Monkey
Tue Jun 12, 2012 10:54 pm
Forum: Ren'Py Questions and Announcements
Topic: How do I show two images together
Replies: 2
Views: 312

Re: How do I show two images together

You have to have different tags for them, otherwise they'l just get swapped out. Here's an example:

Code: Select all

image sylvie smiling = "sylvie_smiling.png"
image eileen smiling = "eileen_smiling.png"
by Code Monkey
Mon Jun 11, 2012 8:29 am
Forum: Ren'Py Questions and Announcements
Topic: Fading text & object interaction
Replies: 19
Views: 1577

Re: Fading text & object interaction

SundownKid wrote:When you are using xpos, you need to put down the actual coordinate. xalign is when you use 0.0, 0.5, etc.
No, floats work with xpos and ypos as well, not just the actual coordinates.
by Code Monkey
Sun Jun 10, 2012 9:56 pm
Forum: Ren'Py Questions and Announcements
Topic: Multi-line comments for Ren'Py?
Replies: 2
Views: 1662

Re: Multi-line comments for Ren'Py?

I don't know if there is a way, but you can use hotkeys. If you're using jEdit you can go to Utilities -> Global Options -> JEdit -> Shortcuts. There you can set the "Comment Selection" and "Uncomment Selection" commands to whatever you want.