How do I Create a shield

0 favourites
  • 10 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • I am triying to create a guy using a shield that if it is attcaked from the front it will reflect the projectile and if it is attacked from the back it hurts him,Does anyone have any idea?

  • A sprite, pinned to the player.

    Then bullet, on collision with shield > reverse the angle

    on collision with player > subsctract health.

    Should work

  • another sprite for the shield?

  • invisible sprite he means

  • lol

    just make a invisible sprite in

    and pin the angle and position of it to the main charachter on start of layout

    then if you bullets that are shot at the main hero are using bullet behavior add behavior solid behavior to the shield. and for the bullets change change the bullet behavior properties that says bounce of solid object to yes. and its done u dont need crazy stuff is to simple... il do a capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • so here it is,,... however not sure how it will perform when you will try to jump through platforms since its a solid. i wold make a custom event bounce effect


    eh and here is the one that allows u to jump through platforms and still rejecting bullets


    for the shield to make it invisible just set the opacity to 0

  • lol... i started doing u the shield, and then i couldnt stop not to make it more cool )))

    here it is the hero with sword, shield and breath effect


  • Hey, learn to edit your posts. Nobody like a double post, not to mention triple posts.

  • Hey, learn to edit your posts. Nobody like a double post, not to mention triple posts.

    my bad sorry

    edited :

    hope you enjoy my capx though

  • Does the bullet behavior include raycasting collisions? If not, there may be "bullet through a sheet of paper" problems where it skips through the thin shield because the shield is thinner than the amount the bullet moves in one frame.

    My solution to that, in a top down adventure game, is to compare the direction of the bullet(or sword swipe) as it hits the player. If the bullet comes in withing 45 degrees of Player.angle+180, the the player gets the shield bonus to armor.

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