0 Favourites

to many blocks

  • hey, i need help!

    the problem is quite simple im sure but i cant figure it out...

    ive have a game were the player can pick up blocks that make up the floor

    ive got that working but i cant stop the player being able to continuously pick up blocks from the floor. i only want the player to pick up one block at a time. ive created conditions for the picking up of the block, can i then put a block on this condition when other conditions are met?

    any help would be great!

  • I don't understand clearly but have you tried adding a condition to the "picking" block... like

    if:      "player.free = true" (free is a boolean instance value)

            "player" (does whatever action triggers the picking)

    then:    set player.free to false

            do the "picking" thing

    I guess this would keep the player from picking infinite blocks

    and when it "drops" the block --- set player.free=true again

    hope it helps

  • you could also achieve the same result with groups

    put the event(s) that lets the character pick up a block in a group, then when the player is holding a block, you disable that group (meaning the events can't be executed at all) and activate the group when the player isn't holding a block.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • ok that sounds quite complex ive never used a group or a boolean instance before, ill have to have a good look in the manual see if i can figure it out.

    thanks for the replies

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
34 3,116
Cassianno's avatar
Cassianno
Unread hot topic
0 Favourites
I'm blocked
32 2,125
JosepM's avatar
JosepM
Unread hot topic
0 Favourites
R.G.Blocks v0.6
30 4,487
harrio's avatar
harrio