lionz's Forum Posts

  • The events for the walking animation are key here but I don't see them. In general though you need a condition on the walking event 'is not firing' or something similar. Also can you add the trigger once to the top level that's the standard, and also 'on animation finished' is a trigger event which only ever triggers once so no need to add a trigger once after this.

  • You can have instance variables on the enemy and when clicked you change the value of it so you know that is the targeted one, variable could be targeted=yes/no. Then when you perform the attack it is done on the instance where the variable is set.

  • I meant do you have any examples of what you're talking about because it doesn't sound like you're referring to a generic platformer like Mario?

  • Hi do you have any examples?

  • I don't know if that top condition is really going to work but I'd have to test it myself. If you don't have line of sight you can then check if the array contains the value like you did in the second condition, and if it does then delete the cur X.

  • Yes often things that are working and look good in events for one instance go wrong when you introduce multiple instances to pick from randomly. Events should work in a certain way to avoid bugs. Yes if you set it to angle 90 it will face down and so will the LOS.

  • The issue is not necessarily the cone, when people start to pick with multiple instances it can cause issues unless the events are tight. The cone of view points in the direction that the object is facing, it doesn't default to anything but an object may default to angle 0.

  • If you could rephrase the question so it's more like a human asked it that would be useful. Help us to help you.

  • What action?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • At the end of 2021 I wasn't involved in any game development so yet to resubscribe but I plan to at some point, I don't use any other engines, I tried and tested them but I only use Construct for making games. If I am away I am taking a break and not using something else.

  • So did the other post resolve the problem?

  • Not subbed right now but as I recall you can't put a Family in the container with the Text so it would not be useful here but you can try it. You can link in other ways with overlap or pick nearest condition, or you could have variables on the Family and text and when you create them both together give them the same value/ID.

  • When you say it works what do you mean exactly because that condition is not good. You'll probably find the item names are wrong and all the first value of the array? Technically the actions are correct though. With that condition you are saying to pick a random array object not a random value inside the array.

    To fix this, drop the condition. At the top of the actions set a local variable to the value round(random(0,inventory.width)) to choose a random row of the array. This variable will then be the item you need, you can use the variable in the other actions such as ItemName becomes inventory.at(variable).

  • The global variables should be an instance variable on the buildings then you have 1 instead of 165. You would link the text object to the building with a condition such as is overlapping the building.

    The second section, if you put the building objects into a Family you can use one event with the Family, so for the first bit I mentioned use Family instance variables from the beginning on the buildings to enable easy use of them.

  • That's kind of an entirely different question because you said you've already set it up. You could check the manual on arrays, they are simple to use but difficult to explain everything in a forum post. There are also existing posts on inventories using arrays and tutorials available.