pj4ever's Forum Posts

  • 14 posts
  • Maybe the "several frames" method is the best solution. Thanks for the fast reply!

  • I've stamble upon this issue: i've pinned 2 cannons and an engine to a space ship so i can change the graphics when the ship will be upgrade. No matter what type of controll i use (in this moment i still use the "drag controll" on a touch screen), when i drag the ship to the edge of the layout, these objects go through it. Everything is set with the behaviour "bound to layout by edge" but only the ship stay.

    How can i solve this?

  • Really? I thogth the events works simultaneously. But there is another issues for the enemy ships, the same thing happen. So the problem is that? That's weird. I'm lost now

  • Indeed, when change order of event sheets, only the first two on the top works. An example, when i move the event sheet "enemies_meteor" putting it below the second event sheet added, just don'work, the meteors never get destroyed, don't flash in white and the family variables doesn't change at all. Now i'm tring to create a new project and start again coping all the codes and see what happen.

  • If you move the included event sheets, the three on the bottom doesn't work for me. Before the comments i used groups instead, thinking that was the problem. I'm going crazy...

  • I don't know how to post a capx, but i've uploaded it on drive.

    Link

    drive.google.com/open

  • I spend a lot of time to figure out what was the problem with my code. I have 5 event sheets included in 1 event, it's ok so far, until I discovered that, moving events by changing order, the two peaks at the top work while the other three do not.

    Is that a bug? Is there a limit of many events can be included?

  • Hello again constructers! I made an inventory sistem based on array thanks to your help. Now it's time to display this inventory, and i think that i haven't figured out at all becouse the code i've made is wrong.

    This one.

    However my reasoning don't sound so bad: loop in the array till find the desire value in CurX,Y3 (not 0 base), than use that value to change the animation frame of the image used to reppresent an inventory slot. I'm serching for knowledge. So where is the mistake?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • something like this...

    ArrayInventory2.capx

    You rock! Absolutely! Thank you soo much! Now it's time to do the visual stuff!

  • You can try this

    You a variable to make when it set within the loop so it won't keep setting.

    This is a loop breaker! Thank you for the tip! It's actually working but the "insert", as name suggest, still add more rooms in the array. It's possible to delete the last index but is not was i looking for. I think i gonna keep working on your break loop solution! Thanks!

    > .. the inventory could have any width, e.g.: a bag contain 10 spaces but i wanna make it bigger, than i buy a new one with 20 spaces..

    >

    I think ....you know how to solve this..but just in case...

    ..Add Variable "Bag(max_slots)"=10

    ................and then compare.....if Variable<Array.Width....then.....Push item in the bag

    ..and when you "buy a new bigger bag"...set Variable to 20...

    I'm afraid you're wrong becouse, i don't really know how to solve this. Anyway, thanks for the tip, i'll give a shoot!

  • > .. in your example the intial array width is 0 and you use push back to create a "slot" and the expression"Set value at (ArrayPicked.Width-1, 1) to 1" to put the value, whic is great but, in my case, i already know how many slot i have in my invetory...

    >

    I use " o width" and "push" because I dont know how meny slots you have in inventory... <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    You're right indeed but, the inventory could have any width, e.g.: a bag contain 10 spaces but i wanna make it bigger, than i buy a new one with 20 spaces. Your solution is pretty cool (i will quote you if my game will see the light!).

    Try this:

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

    I've try this kind of code early but i think that the "stop loop" doesn't do anything, just as [quote:g5qfubfc]PhoenixNightly

    say.

    Thank you guys for the answers. If i discover something, i will share in the tutorial section <img src="{SMILIES_PATH}/icon_cool.gif" alt="8-)" title="Cool">

  • see.... if this helps you

    Example.capx

    Thank you for the example, it's self-explanatory. It's still not helping me becouse, in your example the intial array width is 0 and you use push back to create a "slot" and the expression"Set value at (ArrayPicked.Width-1, 1) to 1" to put the value, whic is great but, in my case, i already know how many slot i have in my invetory. Any way, it's a great idea.

    The for each command is doing that. That is why it is filling it up your commanding it to put it in each slot. You should check for the first empty slot and place it there.

    So 'for each' then to a check for if the current slot is empty if so break out the loop and place it there.

    How can i break the loop?

  • I've already read all the tutorial on the array and inventory sistem but i can't figured out this: when the player grab an object, this should be put inside in the invetory firts slot avaible but this happen;

    The object fills all the slots in invetory. This is the code i use:

    The logic i still looking for is: grab the item, is the first slot avaible? yes put in that, else check for the next one.

    Please help!

  • Hi everybody! i've just brought this awnsome engine a couple of days ago and i'm just plaing around with it. I've start to make a simple platform and i can't figured out the platform jump. What i want are 4 jump states: start jump, jumping, falling and land. For the middles (jumping and falling) i've got no problems, everythings works good. I've use the events "on jump" and "on land" but the animations doesn't work has want it, and also when the player start jump and land he shouldn't move at all (just for 4 frames), but is still moving. Do i need some kind of plug-in like states machine or something? If not, can someone help me to figured it out? Thanks!

  • 14 posts