frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

how do i make the player attack enemies?

Comments

  • This isn't very specific but can be simple.
    There are many different possibilities you can do for what / how you want to do it...

    but the easiest way to do this I can think of is:

    - Make a sword
    - Collision (sword) -> Destroy [in the enemy].
    - Control the sword
  • Depends on the case, but normally you can use the emit behavior under the components section.
    1. Make an object, such as a bullet or a sword-slash, that you want to kill the enemy with.
    2. If you make a bullet, make it movable. If you want melee weapons, then don't. Usually it's best not to make it solid, but enable collisions.
    3.
    -Player behaviors:
    Keyboard[Spacebar] - Emit [bullet]

    -Enemy behaviors:
    -Collision [bullet] - Destroyer

    That's the simplest formula for killing enemies with a gun, using spacebar.
    Also, keep in mind that you can refer to the "help" section before posting in forums, where there are many guides and videos to help you out.
  • ok thanks

Sign In or Register to comment.

flowlab.io

| make games in your browser
@ 2017 Flowlab.io, All rights reserved.

Contact us

Get In Touch