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 to "Grab Items" or add a "tag" feature

edited April 26 in How To
Hey @grazer !! I am trying to make a game where you have to grab a ball and bring it back to your area, an enemy can knock the ball out of your hand which it would then go flying and another player would have to pick it back up. I can't figure out how to make my characters pick up the ball, any help with this project would be great!

Here is a link to my game: http://flowlab.io/game/view/1162830

Comments

  • I recommend to extract behavior to get the x and y of the player and set the balls x and y position. You could use expressions to put the ball in front of the player after getting the x and y positions.

    You could also use an attacher behavior in the player to attach the ball to the player, but
    this will always be center of player
  • edited April 26
    I tried doing that, and it has worked great so far. How could I make it slightly above the players head? Either that or make it lag slightly behind? @JR 01
  • edited April 26
    Use the expression behavior;

    put the value into A and val and just add or subtract what you want in B.
    The bottom part would be like A-B or what you need.
Sign In or Register to comment.

flowlab.io

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

Contact us

Get In Touch