Search found 328 matches

by Mole-chan
Mon May 11, 2015 5:43 pm
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 1594

Re: Reading RGB value of single pixel of image

It's working perfectly fine for me. Ok, I dinged around with it a bit and it looks like the error is because my image is passed in, while yours is built into the method as a default? It makes no sense, but switching them around did cause the image to be read at least somewhat correctly. Still not w...
by Mole-chan
Mon May 11, 2015 5:01 pm
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 1594

Re: Reading RGB value of single pixel of image

DragoonHP wrote:It found the coloured pixel, believe me. The dimension of the image was 660*330
It did seem to work...But if I try any other color (even ones that are already present in the image and require no change), it goes through the whole image and doesn't recognize it.
I'm not sure what is going on.
by Mole-chan
Mon May 11, 2015 4:29 pm
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 1594

Re: Reading RGB value of single pixel of image

importing pygame works perfectly for me. Really? That's odd.Are you sure? I don't know the dimensions of the image you used, so I don't know if it actually found the colored pixel. I'd suggest using: renpy.load_surface(im) rather than pygame.image.load(im).convert() I did make this change, and the ...
by Mole-chan
Mon May 11, 2015 2:34 am
Forum: Ren'Py Questions and Announcements
Topic: SOLVED:Reading RGB value of single pixel of image
Replies: 15
Views: 1594

SOLVED:Reading RGB value of single pixel of image

Hello, I'm sorry for asking such an odd question. I thought I had it more or less worked out utilizing pygame, but I've run into some errors. I want to go through an image and discern whether each pixel matches a pre-defined color. Once the color is found, the loop will break and return the coordina...
by Mole-chan
Mon Apr 20, 2015 11:32 pm
Forum: Ren'Py Questions and Announcements
Topic: Pass ATL Positions to LiveComposite
Replies: 3
Views: 578

Re: Pass ATL Positions to LiveComposite

Hello? ^^;; I'm still having the animation timing issue, and would really appreciate some input.
by Mole-chan
Wed Apr 15, 2015 1:33 pm
Forum: Ren'Py Questions and Announcements
Topic: Pass ATL Positions to LiveComposite
Replies: 3
Views: 578

Re: Pass ATL Positions to LiveComposite

You can't do it that way. What you have to do is to create a Fixed and position the stuff inside it. image cadfael little_smile = Fixed( "cadfael_base normal", At("cadfael_eyes normal", cad_anim_default), At("cadfael_mouth smile", cat_anim_default), xysize=(452, 720)) I figured I could't do it that...
by Mole-chan
Sun Apr 12, 2015 7:36 pm
Forum: Ren'Py Questions and Announcements
Topic: Pass ATL Positions to LiveComposite
Replies: 3
Views: 578

Pass ATL Positions to LiveComposite

Hello, I am wondering how one would pass ATL positions into a portion of a LiveComposite displayable instead of X,Y coordinates. Currently, I am trying this. But it throws a 'TypeError: 'ATLTransform' object is not iterable' error. image cadfael little_smile = LiveComposite((452, 720), (0, 0), "cadf...
by Mole-chan
Mon Mar 16, 2015 9:59 pm
Forum: Ren'Py Questions and Announcements
Topic: Transform doesn't change according to persistent
Replies: 3
Views: 558

Re: Transform doesn't change according to persistent

Color us both surprised! I was just seeing if it even would work to avoid extra loading. Looks like it did. And while the DynamicDisplayable makes sense, I got an error during implementation. This is most likely my mistake. I'm sorry, but an uncaught exception occurred. While running game code: File...
by Mole-chan
Sun Mar 15, 2015 8:09 pm
Forum: Ren'Py Questions and Announcements
Topic: Transform doesn't change according to persistent
Replies: 3
Views: 558

Transform doesn't change according to persistent

Pardon the probably not so clear title with this one. There's probably some background required. Basically, what I am attempting to do is have varying levels of animation for this game, determined by a persistent value. In order to avoid having to load the large animated base, which negates the poin...
by Mole-chan
Sat Mar 14, 2015 1:31 am
Forum: Ren'Py Questions and Announcements
Topic: Applying AlphaMask to Filmstrip [SOLVED]
Replies: 14
Views: 1377

Re: Applying AlphaMask to Filmstrip [SOLVED]

Works like a charm on initial testing! Here is the code I ended up with. def draw_animation(st, at, img, width, height, last_frame, framerate): number=int(at * (1/framerate)) if number >= last_frame: howManyWraps = int(number/last_frame) number = number - (last_frame*howManyWraps) return Transform(I...
by Mole-chan
Sat Mar 14, 2015 12:21 am
Forum: Ren'Py Questions and Announcements
Topic: Applying AlphaMask to Filmstrip [SOLVED]
Replies: 14
Views: 1377

Re: Applying AlphaMask to Filmstrip [SOLVED]

for example, if there's an animation folder X and it has 00~10.png, def draw_animation(st, at, image_path, last_frame): number=int(st*20) if number < last_frame: return Image("{}/{:0>2}.png".format(image_path, number)), .05 else: return Null(), None renpy.image("animation_name", DynamicDisplayable(...
by Mole-chan
Fri Mar 13, 2015 10:00 pm
Forum: Ren'Py Questions and Announcements
Topic: Applying AlphaMask to Filmstrip [SOLVED]
Replies: 14
Views: 1377

Re: Applying AlphaMask to Filmstrip [SOLVED]

for example, if there's an animation folder X and it has 00~10.png, def draw_animation(st, at, image_path, last_frame): number=int(st*20) if number < last_frame: return Image("{}/{:0>2}.png".format(image_path, number)), .05 else: return Null(), None renpy.image("animation_name", DynamicDisplayable(...
by Mole-chan
Fri Mar 13, 2015 9:03 pm
Forum: Ren'Py Questions and Announcements
Topic: Jumping to another script? [Solved]
Replies: 11
Views: 6736

Re: Jumping to another script?

The method I suggested requires you to jump to a specific label, not the script as a whole. For example: Jump(example) With a label looking something like this label example: e "Hello!" Treating it this way is why the tutorial can jump back and forth between scripts so easily. If you'd rather treat ...
by Mole-chan
Fri Mar 13, 2015 8:38 pm
Forum: Ren'Py Questions and Announcements
Topic: Jumping to another script? [Solved]
Replies: 11
Views: 6736

Re: Jumping to another script?

Is there a particular reason you're using Python (.py) instead of Ren'py (.rpy)?
With the latter, you should just be able to jump to your desired label, regardless of what file it's in. Because Ren'py looks across all .rpy files.