How do I make an outline for a sprite.

Get help using Construct 2

Post » Thu Feb 04, 2016 7:47 pm

Ah, my pretty placeholder art in all its outlined glory.
Image

Hey, how can I prevent newly spawned objects to have a outline too? Is there a way to reset the canvas?That black box should look the same than the orange ones.

Edit: nvm I was just creating the objects on the wrong layer.
B
10
S
2
G
1
Posts: 51
Reputation: 848

Post » Fri Feb 19, 2016 1:21 pm

I really like the outline effect but i run into a problem that if i make the paster big enough to cover my whole canvas it makes my game lag like crazy (multiple objects need pasting etc.) So i was wondering that if i were possible to have it stay on my hud layer and move when i move so it only needs to paste the sprites that are visible, but i really just cant get that to work. Could someone help me out?
B
10
S
2
G
1
Posts: 51
Reputation: 848

Post » Fri Feb 19, 2016 7:05 pm

Put the paster on a layer with a parallax of 0,0, and make it only the size of the screen. Then you could use the is on screen conditions before pasting the objects.
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Post » Fri Feb 19, 2016 11:12 pm

http://imgur.com/a/Co0qg
That is what I did but this is my end result. The reason why the sprite overlaps the outline while jumping is because on that point the view is on the very top left part of the map and has not scrolled anywhere.

What is causing this offshift?
B
10
S
2
G
1
Posts: 51
Reputation: 848

Post » Sat Feb 20, 2016 6:28 pm

Oh, ok. do this instead: give the layer a paralax of 100x100, and make the hotspot of the paster be the center, then right before pasting the objects to it set it's position to scollx,scrolly.
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Post » Sat Feb 20, 2016 7:04 pm

This worked much better, however there is some stutter with the drawing. I am trying to draw the player sprite, which is positioned every tick on the playerbox sprite(which is invisible), and the playerbox has scroll to behavior. It works perfectly for the other objects though.

http://imgur.com/a/xOTSX <- link has a screencap of the stutter and how it looks like now
Image
i pasted the set position to event multiple times to avoid random offset
B
10
S
2
G
1
Posts: 51
Reputation: 848

Post » Sat Feb 20, 2016 10:19 pm

Maybe make the paster be at an integer position like int(scrollx).int(scrolly)
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Post » Sun Feb 21, 2016 12:06 pm

R0J0hound wrote:Maybe make the paster be at an integer position like int(scrollx).int(scrolly)

thank you so much! :>
Image
B
10
S
2
G
1
Posts: 51
Reputation: 848

Post » Sun Feb 21, 2016 6:36 pm

Cool
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Previous

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 8 guests