How do I Stack an item and collect it?

0 favourites
  • 6 posts
From the Asset Store
A game with 3D terrain, realistic water and various 3D objects.
  • all i want to do is just to make a simple thing, but it's driving me crazy.

    so hello guys,

    i need your help to point which went and how it went wrong (i'm still a beginner)

    i wanted to make so that when the block clicked, it will spawn some drops that can be stack (it should be)

    and when the player is overlapping the drop, it will take the drop*value. so if it written 5 in the block,

    player will take 5 value of block.

    errors :

    -the text showing the right number, but when player collects it, it only gives 1 value of block.

    -when there's 2 or more stacked blocks in the screen, and the players take one stack of the blocks, the other will decrease it value to 1.

    -the second breaked block might overvalue (more than the maximum) than the numbers of block it should drop (2-5)

    File : mediafire.com/file + /7swb6naa9as302q/Stack_%26_DropRate.capx

    (i cannot put an url so please remove the "+" and the space between it then copas it)

    Thank you !

  • Here's a start.

    http://www.blackhornettechnologies.com/Construct2Stuff/ApaYaa_Stack_&_DropRate.capx

    I didn't understand everything you wanted, but the stacking is sorted out.

    First, you can use containers to associate objects together. Read the manual for details.

    As soon as you start repeating a pattern, stop. Computers live for patterns, so a For loop deals with your stacking.

    Your spawning was overly complicated, so that's a bit simpler now.

    Edit: on re-reading, this may not be what you wanted, but I'll let you respond.

  • blackhornet I think by "stacked" ApaYaa meant multiple value, not several sprites piled on top of each other

  • dop2000

    Ya, that's what I got on the second read, although the post did change. I still don't understand the third error point, so I'll wait for a response.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Or is this closer?

    http://www.blackhornettechnologies.com/ ... te_v2.capx

    problem 2 and 3 is fixed thanks,

    but what i meant for the 1st problem is theres a text showing (for example, 5) and when the player overlapped (collect) the dirt. the dirt and text will be destroyed,while giving the 5 dirts to inventory.

    thank you

    [problem 3 is that sometime if you break both block first (you still can only break 1 block at a time) and the first block had no problem(2-5 count), while the second block count can get up to 10 but it's fixed now so dont mind it]

    EDIT : nevermind i found it, thank you very much black hornet! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

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