[Solve]How to make a laser effect when shooting?

1968

  • Posts: 45
Hi Hi... 8)
This is a working version. There are two questions:
1. How to make a laser effect when shooting?
2. the fall of the FPS?
control _ mouse
left click _ laser
http://www.stencyl.com/game/play/39678

« Last Edit: November 25, 2018, 04:00:45 am by 1968 »

JeffreyDriver

  • Posts: 1862
1. I've previously created a laser effect by drawing a line between the player and the bullet actor

2. I didn't notice any drop in the FPS. Most common culprits are simultaneous collisions and something running in an 'Always' event.

Your game is looking good. I noticed that your crosshair jitters about. To stop that, make the crosshair stop tracking the mouse once its within a certain distance. Something small like 3px.
Current Projects:
Retro Redux Compilation (NEW).
Retro Redux (untitled) (NEW).
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

1968

  • Posts: 45
Thank JeffreyDriver
I will try ... 8)
PS. Your site has a lot of useful...!

« Last Edit: November 25, 2018, 04:07:25 am by 1968 »


JeffreyDriver

  • Posts: 1862
I'm guessing that isn't exactly what you're after, but it is at least a good start. First of all you need to draw behind the image of your ship, and stop drawing a moment after mouse press.

If you want the lasers to move from the bottom of the screen to the cursor, it gets more complicated.  In the game I made, I had the laser drawn between a projectile and a gun, so the laser grew as the projectile moved away.

See my game Alien Storm in this compilation as an example - http://www.stencyl.com/game/play/37229
Current Projects:
Retro Redux Compilation (NEW).
Retro Redux (untitled) (NEW).
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

1968

  • Posts: 45
Remarks accepted ... look. 8)
http://www.stencyl.com/game/play/39678
Now we need to make an attack of "aliens"