lionz's Forum Posts

  • Try making the slot objects global. Persist is for when you return to the same layout, not going to the next layout.

  • You do not have permission to view this post

  • Put Base and Torso in a 'Container' (see manual for more info). This means when you create a Base, it will also spawn a Torso, and they will relate to each other in events automatically without having to use variables.

    Also I'm not sure how you created a custom variable called Count, that shouldn't be possible afaik.

  • I use local storage and save a value there. Global variable won't make much sense bceause that would be included in the saved game which means you need to load it first.

  • You can use a variable on the player, so on the E event for picking, set to true in an action like for example player.hasItem=true. Then on the condition for the E key press event you can say 'if player.hasItem=false', so E only works if they are not carrying an item.

  • That's just how Construct works so I can't see a way around it, you pick instances of an object and apply actions to those instances.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you are applying the same events on multiple objects then this is where Families are useful for grouping objects and applying to Family / all. Instead of separately picking object A and object B by UID, you can pick the Family.

  • You need to know the object type so you can apply the proper actions to it. Why don't you know what object it is ?

  • Not luck, it is running through them in order and finding the first one then stopping. Check to see if the correct ones are changing.

  • You don't need to add those extra conditions as it is already running through every sprite. On the actions for the loop you can add set status to 1 and then use Stop loop if you want it to change just one of them.

  • Do you mean in order of ID so 0 then 1 then 2 ? There is system condition 'for each(ordered)' so it can run through them in order of the ID.

  • Ok well it's a little more complicated because the objects are the same, if they were different it would be a simple set object B var to objectA.var.

    Here are two ways I tried using a function to set the var or by setting it 'on object created' with a global variable.

    Note the second way has an extra variable spawnnew because if you don't have this it will also assign the variable to the blocks created on start of layout and you probably don't want this.

  • Show the event of the triggering object or are you saying bblock makes a bblock spawn? And what variable?

  • Nice! container just means they are related objects, when you create one, it creates the others and they are related in events to avoid the matching variable logic. More in the manual!

  • You can open the file even in free version of Construct 3 on this site to see it