How do I make enemy UFO's have beams?

1 favourites
  • 5 posts
From the Asset Store
336 high-quality UFO engine sounds in a futuristic style.
  • I'm making a game where you have to shoot down enemy UFO's. I've also given them line of sight. The problem is that when one sees me they all turn there beams on instead of just the one that sees me. And the second problem is when i shoot down a UFO and another UFO sees me, the beam of the dead UFO turns back on how can i fix this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is a pic of my event sheet...

  • You probably need to do something like... If UFO has line of sight to player set UFO to iseeyou. Then do a sub event. If UFO is iseeyou then do whatever you want with the beam and if UFO doesn't have line of site to player set iseeyou off. If the UFO is destroyed you can either just completely destroy that object so it's not on screen anymore. That way the ones shot down won't do anything because they are not there anymore.

    If you want to have the ones shot down on screen still you might have to give them an instant variable. Maybe something called destroyed. So in your other event when you set it to iseeyou also have it check to see if UFO is set to destroyed and if it's not then shoot beam and obviously it's set to is destroyed ot shouldn't shoot beam. Hope this helps you work this problem out.

  • Also I'm not sure how the beam looks shooting from your UFO with it being pinned but I think not pinning it and giving the beam the bullet behavior and shooting multiple beams at that player while it has line of sight would be cooler 😎 just my opinion LOL but maybe you have a reason to pin the beam to the UFO

  • mikewalton206 Thank you so much. I'm super pleased how it came out. I will put it in arcade for you to check out. Thanks for the help!!

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