lionz's Forum Posts

  • enemyposition should be an instance variable on the enemy object then you can set it for each created instance

  • The animation name isn't the issue, the issue is because you set the sword to a different position so it's not overlapping the table 'on drop'. Since events run top to bottom in Construct you need to set the position to the drawer later.

  • Great :) containers can be powerful if you know what to do with them!

  • I assume you're trying to display the value for each mineral. Each mineral instance needs a text object next to it. If you have it overlapping the mineral object you can say mineral overlapping text - set text to mineral.var

  • You don't need to keep spawning them but place one next to the mineral. Then you need to relate them, you could use text is overlapping mineral, set text to mineral.var, if they're touching. Or you could use pick nearest mineral nearest to text. Bit confused about what you were trying to achieve with the spawning and 1 second wait.

  • left and right of the event sheet. left is the conditions where you narrow down which instances that the actions on the right should be applied to. In your event you say on collision with mineral collision, then set a variable on a different object, mineral. But these two are unrelated. Normally it would be the same object. There is an exception though called a 'container' where you can put the mineral collision and mineral in a container together and they kind of relate to each other. But at the moment I would stick to using one object here, for collision and variables.

  • You need to pick the same thing you are applying the action to. In this case you could put the 2 objects in a 'container' so they relate, but in general you need to pick on the left what you apply on the right.

    Because you are not picking a mineral on the left (normally would be the one you overlap if you chose the mineral object) it sets variable for all minerals. You could also move the variables to the mineral collision object if the mineral itself is just for visual. As it stands, when you overlap a mineral collision it won't know which mineral to choose as they are unrelated.

  • In theory that sounds fine, if one is set to true then it will deplete the life. Construct has a lot to do with picking instances and applying the actions to those instances. You could share screenshot of the events so we can see how you are approaching it. Also in debug view you can select the instances and see if variables are set how you expect.

    Farming all of them means that it's not using a condition properly such as 'sprite boolean = true, subtract from sprite variable' and is instead picking all the sprites. You can narrow it down with conditions, just make sure they are in the correct structure.

  • To have separate life it is the instance variables you stopped using hehe. In what way was it not working?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you press the F key add 1 to a variable and start a short timer. If the timer ends set the variable to 0. If the variable = 5 then run the ability.

  • If you use persist behaviour on the power up object, when it is destroyed it remains destroyed even when you return to the layout.

  • I remember previous posts where this issue was resolved by putting the Sprite into a Family and then you can pick the object against the family. You would need to subscribe to use Families.

  • Yeah the reason that doesn't work as expected is because framecount is always 1 higher than the final frame, because frames start at 0. The logic to make it work would be something like, on sprite clicked, if current frame not equal to object.animframecount-1 then add 1 to frame else set frame to 0. Which is effectively saying, on object clicked if you are not on the last frame then go to next frame else go to the first frame.

  • You don't need to use a global variable, the object has object.animationframecount expression

  • You no longer automatically follow a post when you respond to it and won't receive notifications unless you click follow. It would be good to have this functionality back in.