lionz's Forum Posts

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

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

  • Try Construct 3

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

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

  • This doesn't make much sense, could you rephrase or add more info. The values you provided don't add up to 12 but even ignoring that I don't see how instances with those values relate to a team of 5 players. The title of the post doesn't really match anything I've read.

  • What is the logic that you've used for collecting and storing items?

  • You need to grab the X and the value from the first array, then you run an 'array 2 contains value', this gives you 3 if it returns false. If true, then you run the further check, find the X of the passed value in the second array, if it matches the passed X from array 1 then returns 1 else it's 2.

  • If you've done 1 then you should be able to do 2 because 2 would just be an Else on 1.