[PLUGIN] Paster

Post your completed addons to share with the community

Post » Sun Dec 28, 2014 7:17 pm

The tilemap object is causing this. It only draws what is onscreen and as I recall the paster objects don't change where the screen is at for the pasting.

I wonder if scrolling to player2, pasting, and then scrolling back to player1 would work as a solution.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Fri Jan 09, 2015 9:07 pm

@R0j0hound
I have a problem.
I use TiledBG. I load the gfx to TiledBG from loose project files, then i try to paste updated TiledBG into Paster and it pasts not the updated image (gotten from "load from URL" action) but the original before the load/update.
Same thing happends when i try to use your Canvas plugin instead of paster.

And the whole reason behind this is trying to find a workaround of this: viewtopic.php?f=146&t=121551&p=871963#p871963
B
29
S
8
G
7
Posts: 643
Reputation: 6,482

Post » Fri Jan 09, 2015 9:47 pm

@irbis
The "load from url" action is not instant so you can't paste right away. You either would have to do it after a wait or under TiledBg's "on image url loaded" condition.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Fri Jan 09, 2015 10:32 pm

R0J0hound wrote:@irbis
The "load from url" action is not instant so you can't paste right away. You either would have to do it after a wait or under TiledBg's "on image url loaded" condition.

Ahhh terribly sorry for that Rojo. I rarely use gfx loading from outside so i keep forgeting.
All works perfectly now.
B
29
S
8
G
7
Posts: 643
Reputation: 6,482

Post » Sat Jan 10, 2015 9:09 am

This seems like an awesome plugin!

Question for @R0J0hound - would having hundreds of these objects on screen be bad form? As in, using them as regular sprites - basically I'm interested in the possibility of "cropping" images by using a stretched textured quad over them.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Sat Jan 10, 2015 9:35 am

@Somebody
You can do that. The only thing to consider is each instance will have it's own texture. It's not really an issue unless you run out of video memory.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Sat Jan 10, 2015 9:54 am

Yeah, I was just playing around with it and watching the debug, and realised that each one will be a unique object. Still, worth it for the possibilities.

Btw, could you clarify the "Draw Quad" coordinate sequence? Is it top-left, bottom-left, bottom-right, top-right?

Also, I made an icon for the plugin, so it's easier to tell apart - it's based on the idea of "stamping" an image onto something. I would actually like to make icons for all your plugins so they are nice and coherent in the UI. Do get in touch if that sounds interesting.
You do not have the required permissions to view the files attached to this post.
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Sat Jan 10, 2015 6:16 pm

@Somebody
Oh cool, thanks for the icon.

With the Draw Quad action the first coordinate in the top-left and the others are in clockwise order.
So top-left, top-right, bottom-right and bottom-left.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Sat Jan 10, 2015 7:02 pm

Thanks, @R0J0hound - I have thought up a system that uses regular sprites if nothing is being modified and Paster sprites if the image has been quad-pasted. That should keep things optimal... now to just implement it.

Glad you like the icon, I'll see if I can do the rest as well. It's meant to be somewhat in C2's style, just different color scheme, but perhaps it needs a little inner shadow to be more similar.

QUESTION: It looks like the family system doesn't recognize a Paster object as suitable - is there a way around this?
B
19
S
6
G
7
Posts: 1,101
Reputation: 6,146

Post » Sat Jan 10, 2015 7:21 pm

@Somebody
Family's can only have objects of the same type. So a family of Sprites, a family of TiledBgs or even a family of Pasters. Different plugin types can't be in the same family.

If you need it for the move behind function then here's a solution to that:
how-do-i-affect-only-the-spawned-object-of-the-same-type_p872347?#p872347
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests