A laser between 2 actors?

orseoste7oorseoste7o Member Posts: 1
edited December 2011 in Working with GS (Mac)
Hey everybody, noob at GS here.
How do i have a laser appear between 2 different actors?
I know one way is too have of the objects create lots of little objects that move directly towards the other object, resulting in a thick 'beam' but that looks pretty bad. So does anybody know any other ways of having a laser (that things can collide with) appear between two actors?
Im pretty sure one way would be to have an actor somehow stretch its self between the two actors, but i have no idea how i can achieve that.

Can anybody help me?

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    When I do something like that I create an animation and spawn it. If you checkout the cookbook videos look for the one on making a health bar. You could modify that to act like a lazer. It shows you how to make a bar shrink and grow.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    @orseoste7o Here is a lazer animation I just put together. If you like it it's yours just tell me your email and I'll send you a zip of the animation pngs.



  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I made this for if you want a bar type laser instead:

    http://mynameisace.com/files/GSLasers.gameproj.zip

    You can drag the endpoint whatever distance away you like.

    I do like @FryingBaconStudios's laser animation though ;)

    Ace
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited December 2011
    @orseoste7o said:
    Im pretty sure one way would be to have an actor somehow stretch its self between the two actors, but i have no idea how i can achieve that.
    Can anybody help me?
    To have a 'beam' actor show up between two actors you need to do three things. 1)position the beam halfway between the two actors, 2) rotate the beam so that each end is pointing at an actor, and 3)stretch the beam so that it is long enough for its ends to touch both actors.

    Here is a demo GS project that shows how to create a quick and dirty laser beam:
    http://speedy.sh/bmrSU/QandD-Laser.zip

    You can click and drag the two box actors around and the laser beam will track their positions.

    Hope this helps!
    RThurman


    Edit: I see that mynameisace posted one while I was making this one. It will be fun to open up his and compare methods! Its always fun to learn new ways of doing things.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    This is like response heaven for @orseoste7o haha

    Ace
  • orseoste7oorseoste7o Member Posts: 1
    Ace, i can't agree more :D

    Thanks to everybody being so helpful, i figured out how to do it. Thanks everyone!
  • CloudsClouds Member Posts: 1,599
    Anyone know how to skin a cat ?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yeah use a sharp knife.
Sign In or Register to comment.