lionz's Forum Posts

  • 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?

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • Ah yeah seems to be correct then, nice! Looks solid to me, there isn't much possbility for bugs. Only problem would be if the condition about less than 0 objects runs before you have the chance to spawn the enemy and spawn point into the level so make sure any spawn actions are done earlier.

  • That's better. I was formulating a response about how the picked count actions must be in the same event. You won't need the Else though because you are picking a number of instances and if it's 0 then EnemyCount will be 0.

  • You do not have permission to view this post

  • On the pick condition where the value is rgb, change rgb to rgbex255