How do I make player pick up object and shoot picked object?

0 favourites
  • 6 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • Hello can someone help me to sort out problem pls.

    My player is able to pick up object with

    player grab_instance 0

    -on collision with box

    -set posistion to player with box


    -box pin pin to player

    add 1 to grab_instance

    if value grab_instance 1 and A pressed

    - player subtrace 1 from grab_instance

    - box set bullet speed 300

    - box pin unpin

    problem is cos all of the boxes getting bullet speed 300 i want to release just box picked by player all of rest of boxes need to stay on possition

    is any way to do it thank you for all help and sorry for my english

  • Yes, you need to pick the pinned box only.

    if value grab_instance 1 and A pressed
    System pick Box by evaluate Box.Pin.PinnedUID=Player.UID
    - player subtract 1 from grab_instance
    - box set bullet speed 300
    - box pin unpin 

    Or, if only one box on the layout can be pinned at a time, simply use "Box is pinned" condition.

  • hello

    thank you for quick replay :)) everything works but i found another problem

    i can pick up and shoot box just once sometimes system allow me to pick up second time but cant shoot

    <img src="" alt="Grab_shoot" />

  • Why the second event "Keyboard A is down" is nested under the firs event? You need to move it to the top level!

    Also, add that condition I posted in my previous comment to only pick the pinned box when shooting it.

  • all working thank you a lot for help

    i have diff question can you tell me why player is falling down throut platforms if behavior is jump thru and is all good when platform is solid. player is falling through when walking on them but good if platform is solid.

    agein thank you for your help :))))

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Jump thru behavior is buggy. Check the collision polygon, make sure that the platform angle is 0 degrees.

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