lionz's Forum Posts

  • Depends on how you are making that player active, you could for example set the player to active on ball collision, 'active' being a variable on the player. Then you have an event for whichever player is active, the controls are enabled, else for the others the controls are disabled. For the AI you could have another variable to mark them as AI or it might be easier to use a second object for this.

  • Maybe. Usually you use that operator as a condition. If you want to set position to two possible values then use a condition to give two options like if A else B then set the position.

  • Destroy the circle and create it new each time. Or set its angle back to the default value...

  • That is a lot of events so someone would have to sit with the file and take a look. As a practice I don't like using Else and also system conditions when working with enemy behaviours. I find it useful to have timer behaviour on the enemy and also a variable for their 'state' that you can use to have some control, when you are relying on animations only it can get a little confusing.

  • Describe the design you are trying to mimic by resetting only a specific object and I'll guide you on how to make it.

  • Under what specific scenario would you need to use that ?

  • Just sounds like an error with picking, you need to tell each one where to go. You also didn't say what logic or behaviours you are using or share any events, kind of impossible to help.

  • Yes you can remove the Persist behaviour. What I think you are describing is an inventory that appears on HUD right so making it global is good for this. I don't think you should use both a global layer and global object. When I look at how a global layer works, it deletes and creates new instances between layouts and you don't want this, probably this method is only good for pure UI display and not objects that have values you want to keep. Global objects keep their same position between layout so should work well.

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

  • Try Construct 3

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

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

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