lionz's Forum Posts

  • What you're describing I can't reproduce it always adds 5

  • Ok you are using two arrays that makes more sense. Sure share the file and say what's expected or how to easily test the item.

    Also please explain the use of loopindex-1? That's unusual. Set Animation to array.at(1,-1) would be the output. Maybe that is where the problem is.

  • There is a test mode option on behaviour on Construct side, is that enabled?

  • Construct 3 not good enough?

  • "After all the setup, every time I put an item into the crafting grid I call the crafting function. I check each x element to "array2" but nothing ever happens.

    So I don't know what I've done wrong, I can see "array2" update every time I put an item in the crafting grid. Looking at the code it looks right but obviously I messed up somewhere."

    This doesn't give any information about what you are trying to do or where it's broken. What is the Animation global variable for? Also the crafting amount you set to an X instead of an X,Y I'm not sure if that's going to be a problem.

    Looking at this function all it does it set an instance variable on the slot to another instance variable on the slot.

  • Where you said you can't simply type the layout name, you can. Put it inside quotation like this "Layout 1"

  • The actual layout name is written as a string inside ""

    So in the compare two values its LayoutName equal to "Layout 1"

  • ...and I need to spawn at different times a member of family with different "ID" - what does this mean? Not clear what you are trying to do.

  • So for the text you use set text to enemy.health

    However the text object needs to relate to the enemy, so you need a condition (unless they are in a Container, this is a different thing). So you can use a condition such as enemy is overlapping text or text is pinned to enemy, some way of linking them together.

    A container is where the enemy and text object are created together so they are always connected kind of like they are part of one large object. This makes picking easier because when you set text to enemy.health it will pick that enemy that was created with it. Check out Containers in the manual if you want to use that method.

  • The issue with animation events is you need to make sure more than one is not true at a time or it will look it's frozen (probably what you are seeing). So if you set the new animation make sure the event to show the old animation is not true with the conditions.

  • If you are referring to several instances of the same enemy object then they all have independent health if you gave them an instance variable. What problem are you having?

  • That's not super helpful, let's see a screenshot

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you have lots of animation events? If so then it is better to change a variable on collision with the sprite, then for your animation events use conditions if variable=0 or if variable=1 to set the first or second sprites.

    If it is very simple single animation used then you can say on collision with sprite set animation. This won't work if you have events calling the original animation so then go with the above idea with variables.

  • Do you mean you have different enemy objects? In that case you can make an enemies Family and use a Family variable for health which they all inherit.