How do I make a laser/beam/flame/whatever "barrier"

Get help using Construct 2

Post » Tue Oct 25, 2016 9:22 am

Sup with that? wrote:Even a sprite should hold up pretty well to stretching in this case. You can make the laser sprite e.g. a 10 x 10 pixel box with a horizontal gradient. That way, since you're only stretching it vertically, the gradient should remain consistent without getting diluted or some such.


It really depends on how you create the sprite, for the idea I had in mind I'm absolutly positive that the stretching sadly wont work, specially for the animation I wanted to create. Specially for the fire laser.
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Tue Oct 25, 2016 9:33 am

@Smileh did you tried the capx? just follow the pattern for the sprite. and all your problems will be fixed.
B
70
S
20
G
67
Posts: 1,316
Reputation: 42,305

Post » Tue Oct 25, 2016 10:18 am

gamecorpstudio wrote:@Smileh did you tried the capx? just follow the pattern for the sprite. and all your problems will be fixed.


I couldn't. Dont have the beta installed.
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Tue Oct 25, 2016 5:17 pm

If I use a tiledbackground I can't animate it, that's the problem. If I make a sprite I can't stretch it and make it look good. There would be way too many different heights and positions

You can animate a tilemap. Just set the tiles in region to tick % n .. where n = count of frames (as tiles).
B
33
S
18
G
28
Posts: 2,474
Reputation: 20,912

Post » Tue Oct 25, 2016 11:59 pm

Smileh wrote:
gamecorpstudio wrote:@Smileh did you tried the capx? just follow the pattern for the sprite. and all your problems will be fixed.


I couldn't. Dont have the beta installed.


but i used r238 beta, stable is r239 you should be able to open it. unless you use some very old stable version in which case i dont want to help for various reasons.
B
70
S
20
G
67
Posts: 1,316
Reputation: 42,305

Post » Wed Oct 26, 2016 9:15 am

gamecorpstudio wrote:
Smileh wrote:
gamecorpstudio wrote:@Smileh did you tried the capx? just follow the pattern for the sprite. and all your problems will be fixed.


I couldn't. Dont have the beta installed.


but i used r238 beta, stable is r239 you should be able to open it. unless you use some very old stable version in which case i dont want to help for various reasons.


They released the 239 just yesterday, when I checket last stable version was r232/33 I think. I will download the new stable one now.
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Wed Oct 26, 2016 9:28 am

@gamecorpstudio just tried it now. It doesn't work at all for what I need/want. I don't neceseraly need to create a "wall".

A good way to explain it would be a flame thrower. I will attach a mockup so you can see what I want.

Image

Creating a sprite / bullet / whatever that doesn't actually travel, just stays in there for a while. A good example is a flamethrower, creates a barrier which you cannot pass for a brief time.

The problem is I could just spawn the sprite, but I need something more "efficient" so I can adjust it to different sizes and heights.
B
14
S
5
Posts: 248
Reputation: 1,705

Post » Wed Oct 26, 2016 11:09 am

I saw an easy 'laser' in your previous posts. This 'flame shape' is pretty irregular.

If i might advise, make different animations for different heights. And set a reasonable max on the amounts of possible heights. You can name the animation in a way that you can refer to the heights with str() and int(). That way the amount of code does not run out of control.

This is 1 investment in not that much time to be able to happy coding for the rest of the project.
B
33
S
18
G
28
Posts: 2,474
Reputation: 20,912

Post » Wed Oct 26, 2016 2:41 pm

for fire, use the beam i did, to make the wall then set it to invisible, then play the fire over it on a new sprite... C2 is simple Puzzle like... il do a demo again...

P.S those flames, you have ..... are making me feeling bad i joined this topic ... i mean we are talking working graphics that can stretch, you show us....... some "Picasso/Rembrandt" weird painting you want to stretch....

ok here it is the new demo laser-flame trower .... now....... i used 2 objects, however you can have 2 animations on the laser beam, as you see the fire effect im using its not looking bad when stretched, or shrink'd, its actually damn hot its all about how you make your graphics. id suggest take your time into finding the right flames?
B
70
S
20
G
67
Posts: 1,316
Reputation: 42,305

Post » Wed Oct 26, 2016 6:20 pm

gamecorpstudio wrote:for fire, use the beam i did, to make the wall then set it to invisible, then play the fire over it on a new sprite... C2 is simple Puzzle like... il do a demo again...

P.S those flames, you have ..... are making me feeling bad i joined this topic ... i mean we are talking working graphics that can stretch, you show us....... some "Picasso/Rembrandt" weird painting you want to stretch....

ok here it is the new demo laser-flame trower .... now....... i used 2 objects, however you can have 2 animations on the laser beam, as you see the fire effect im using its not looking bad when stretched, or shrink'd, its actually damn hot its all about how you make your graphics. id suggest take your time into finding the right flames?


Dude, the flames I drew are just 15 seconds of photoshop over a real game to show you what I meant. LOL I thought it was pretty obvious that is not a real sprite.

Regarding the capx, is pretty much the same as the other one, just with a different sprite. Like I said before, doesn't suit my needs, but thank you a lot for the example, might be useful for some other stuff.
B
14
S
5
Posts: 248
Reputation: 1,705

Previous

Return to How do I....?

Who is online

Users browsing this forum: NN81, Syazanie Amirin and 7 guests