Best way to make a slow laser?

This forum is currently in read-only mode.
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Like these:

    They shoot out, but don't instantly create a line from the start wherever the end is. The laser keeps moving until it hits a wall. And if something gets in front of it, the laser stops moving wherever the new wall is.

  • What methods have you tried so far?

  • What methods have you tried so far?

    This is what I got: http://dl.dropbox.com/u/3314752/lasers.cap

    It works fine when there's just one laser shooter, for the most part. But all the weirdness happens when there is two or more because some segments move to the other line instead of staying where it should be.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You should only check for collision with a special object that goes at the tip of the laser.

    Also, you could use the RTS behavior to drive the laser tip, so you'd launch it at an angle and it would always home in on its target.... have it leave trails with the fade behavior.

    I would do an example, but I FAIL to get RTS behavior to even go somewhere :s

  • Your instances were getting confused because you weren't specifying which gun sprites belonged to which laser sprites.

    I added a couple of For Each loops and a PV called 'gun' to keep track of which laser sprites belong to which gun.

    The guns are labeled 1 and 2 (check their properties), and when they spawn a laser the laser gets tagged with the same number. That way when you tell the laser parts to line up their .Y location with a gun later on, they know which gun to line up with.

    http://www.box.net/shared/hv4a8jp4iv

    It works fine now.

  • Yeah, that could end up being a cool effect.

    However, I want you to take note of this:

    <img src="http://i166.photobucket.com/albums/u86/Kaosjkm/info.png">

    Hope everything works out!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)