How do I create a bullet that doesn't have a set visual angle, but still flies towards a player?

0 favourites
  • 2 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I'm currently making a bat enemy, which spawns when players are within line of sight of the spawner, what I have set up currently is it creates two objects, one being the visual sprite of the bat that doesn't rotate or anything, just play an animation, and the second being the bullet sprite which is angled towards the player. This Bat sprite is pinned onto the bullet on creation. The problem i'm having is that any of the bat sprites just follow a the first bullet sprite that is placed in the level so all the bullets have a reference, instead of concurrent ones.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are better and easier ways to do this.

    1. Add both Batsprite and Batbullet to a container. Then when you create Batbullet, its own Batsprite will automatically be created. It will also be automatically picked in all events, and destroyed later when Batbullet is destroyed.

    To attach the Batsprite to the bullet, use Pin behavior or add it as a child in hierarchy. Do this in the same event where the bullet is spawned.

    2. You can also create a hierarchy manually in the layout editor (select both sprites, right click and add bat sprite to the bullet sprite as child). When spawning a bullet enable "Create hierarchy" checkbox - the bat sprite will be created with the bullet and will already be attached to it.

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