User Tag List

Results 1 to 5 of 5

Thread: 'Laser' Shooting

  1. #1
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Nov 2007
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    'Laser' Shooting

    Hey guys... I could do with a little help on a couple of things to do with programming a laser.

    The first laser question is this:

    Is it possible to create a line at runtime that is at a certain variable length and direction? For example, a cannon could aim at the player, then shoot a laser in the direction of the player and the laserbeam would be the length from Cannon to Player.


    Second question:

    On a different game, I want the player (a spaceship in a side-scroller shooter) to be able to shoot a bouncing laser beam. This would be similar to a bouncing bullet, but obviously 'longer', and it needs to kind of go into a V shape around corners (as a long stream of bullets fired in the same direction would appear to do). I need this to be limited to 1 object though, so a long stream of closely-packed bullets won't do.


    Thanks!

  2. #2
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 'Laser' Shooting

    For your first question, scaling and rotation is the answer. You change the length of the object based on the distance between the two and change the angle in the same manner.

    For the second question, bending objects are not possible in one simple object. You would need to use the Sphax VectorialCurve object. I'm not sure if it has been released yet.

  3. #3
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Nov 2007
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 'Laser' Shooting

    Quote Originally Posted by Brandon
    For your first question, scaling and rotation is the answer. You change the length of the object based on the distance between the two and change the angle in the same manner.

    For the second question, bending objects are not possible in one simple object. You would need to use the Sphax VectorialCurve object. I'm not sure if it has been released yet.
    Thanks

    How do you retrieve the angle, though? I know how to get the distance. Will I need to use the Advanced Direction Object?

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: 'Laser' Shooting

    Use the Clickteam Movement Controller object. It can calculate both the distance and the angle for you. If you have MMF2 build 243 or later you have it.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: 'Laser' Shooting

    I made a game like that where I set the cannon/gun to always aim at your player. If you want it invisble, you can, I didn't. Then whenever you move, the cannon will "look" at you. Then set it to whenever it shoots and object (on a timer or whatever) to shoot in its direction. It worked great on my game.

Similar Threads

  1. Laser help
    By Brosephus in forum The Games Factory 2 - Technical Support
    Replies: 0
    Last Post: 18th May 2013, 09:08 PM
  2. Laser Frenzy
    By knpmaster in forum iOS Released Games & Apps
    Replies: 2
    Last Post: 28th March 2013, 11:30 PM
  3. 360 Laser Example
    By Jaffob in forum File Archive
    Replies: 9
    Last Post: 2nd October 2010, 08:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •