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
28
S
12
G
4
Posts: 192
Reputation: 4,579

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
89
S
30
G
95
Posts: 5,157
Reputation: 63,450

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
22
G
15
Posts: 1,039
Reputation: 15,219

Post » Tue May 07, 2013 5:29 am

@7Soul
Sure you can, just load the canvas url into the sprite.
Image ImageImage
B
166
S
49
G
154
Posts: 8,108
Reputation: 100,237

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
28
S
12
G
4
Posts: 192
Reputation: 4,579

Post » Wed May 08, 2013 2:36 am

Image ImageImage
B
166
S
49
G
154
Posts: 8,108
Reputation: 100,237

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
28
S
12
G
4
Posts: 192
Reputation: 4,579

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!
Image
B
104
S
23
G
17
Posts: 1,350
Reputation: 22,018


Return to How do I....?

Who is online

Users browsing this forum: danul777, tikuna and 1 guest