how do I add new pixel content to a sprite?

Get help using Construct 2

Post » Sun May 05, 2013 6:27 pm

I saw somewhere on the forums a plugin that added text to a sprite.

Is it possible to do the following?



1. Start with a simple sprite
2. make Z number of duplicates with a small X,Y offset in one direction (creating "depth")
3. take a snapshot of the bunch of sprites, converting the snapshot into a new sprite, and delete all the original overlapping sprites.

I thought it would be doable through the system->"snapshot" command, but I'm missing the following functionality:

1. at runtime, crop the sprite containing the snapshot, to specific coordinates
2. replace the background color of a sprite with transparent colorchristina2013-05-05 20:39:59
B
19
S
7
G
2
Posts: 188
Reputation: 2,846

Post » Tue May 07, 2013 4:17 am

Try the canvas plugin, you can do what you want with it's paste object action.
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Tue May 07, 2013 4:29 am

[QUOTE=R0J0hound] Try the canvas plugin, you can do what you want with it's paste object action.[/QUOTE]
Yeah you can paste, but it doesn't become a new sprite. There's no way to do that as far as I know. You can make a bunch of objects act like one (there would be a ton of objects...), but not what you have in mind
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Tue May 07, 2013 5:29 am

@7Soul
Sure you can, just load the canvas url into the sprite.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Wed May 08, 2013 1:16 am

@7soul @R0J0hound

Thank you!
How do I take a snapshot of a *portion* of the screen?
And how do I replace the background gray with transparent?
B
19
S
7
G
2
Posts: 188
Reputation: 2,846

Post » Wed May 08, 2013 2:36 am

Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Wed May 08, 2013 11:55 am

@newt That's so clever! You can paste *into* canvas!! I finally understand the whole thing.

Thank you so much for the .capx, it's super illuminating
B
19
S
7
G
2
Posts: 188
Reputation: 2,846

Post » Wed May 08, 2013 5:20 pm

kkkkkkk @newt avatar is hilarious!!

Saving the file, it'll help a lot soon =]

Thank you @christina, you always have good questions!
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,213
Reputation: 18,484


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt, Unconnected and 31 guests