lionz's Forum Posts

  • Hmm still difficult to understand the game as I cannot see it but maybe you can push character name with the phrase, so name is at 1,0 and phrase is at 1,1 ? There is probably an easier way to do what you are trying to achieve. if you're saying some notifications get pushed to a main array specific to a character then you could identify this in some way outside of the phrase. If you have very few characters maybe you could call from several different arrays?

  • Hiya,

    Is there a definite need for the whole phrase to be in the array? You could possibly structure your game so that you have phrase + variable and the variable is always a single word from the array, but I don't know your game.

  • What you have there is all you need. The idea is that you have one object to handle the collisions and the animations do their own thing. You only need to detect player collision with the one box object. In 2D side scrollers you are not checking collision right down to the shape of the body of the character however if you are using a melee weapon for example you could spawn this with its own collision to detect an attack.

  • Well if the gameplay is specifically 'until the object is used', you can do what you have now the variable >= 25 with condition system compare 2 values : object.count=0

    This means if variable is greater than or equal to 25, and number of this object that exists is 0 then create the object. It will only trigger again if you use/destroy the object.

  • It looks like you assign the object an ID and position based on enemy UID on start of layout but not when it's created there. Did you check that the object is created?

  • Probably not true. The conditions, not your post.

  • You don't need to use 'for each' every time. The reason your other logic is working is because family objects are picked by prior condition from the object themselves i.e. family.x = something or family.var = something or family is on screen etc. You need to use it in this scenario because the system condition is more like a true or false without picking all the family instances where that distance check is true.

  • Yes it picks one instance, the one with lowest UID. If you don't add a 'for each family' then what this event is saying is - I am true if the family object with the lowest UID is this distance from the player, then if this is true, apply the 'actions' to every instance of family. It picks only the one instance of family, with the lowest UID and compares the distance, if it's true then it runs the action against all family members since nothing was initially picked. If false i.e. the family object with lowest UID is outside that distance then nothing will happen.

  • Did you use system compare two values to calculate distance? The system object doesn't pick instances. When you add the 'for each family' it runs that distance check for each instance of the family.

  • You wouldn't have the points as different objects first of all. You would likely have a location point with an instance variable, you create them in the layout and set the instance variable to a number order. Then you create a global variable that relates to the instance variable during gameplay.

    So you have one event, find path to location point where locationpoint.var=global variable. So 0 to start with. Then you have another event on arrived at location point, add 1 to global variable and run the find path event again. This would then look for the next location point where the instance variable is 1.

  • Assuming most of the cards are hidden in a deck, you would create the sprite/card when drawn and apply the attributes at that point by setting instance variables on the sprite/card object. In terms of storing the data for the deck, you would probably use an array.

  • Try creating 2 imagepoints on the basket where you will position the green bits. Then you can do an event : on basket created > spawn green bit at imagepoint 1 and spawn green bit at imagepoint 2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh if the basket moves about then you can pin the solid objects to the basket, all good.

  • Well they don't need to relate to the basket sprite if they are just used as collision detectors for the ball. If the basket doesn't move then you just position then on either side of the basket where the green area is and set them to solid. Pin is not really required unless the basket moves so the collision objects move with it.

  • hello!

    Yes I can see why you made this post, that approach would become a little tedious with many questions. This is probably best done with an array. For example, you would have the question at x,0. The answers would be x,1 to x,5.

    So you would have a variable for tracking, it's set to 1. You display the question in the layout that is variable,0 so 1,0 in this case. And the answers always apply to x,1 x,2 x,3 etc so in this case its 1,1 1,2 1,3. When you click on the third answer it always add 1 to x,3 so in this case 1,3 in the array. So your line of the array looks something like this : question | answer 1 total | answer 2 total | answer 3 total etc

    Now when you want to come to the next question all you need to do is change that variable from 1 to 2. This then picks everything that is in the array at 2,0 2,1 2,2 2,3 etc so the question text and the answers all get added to the second line for that question.

    You can then save the array as a json format string, so you are saving only one thing into local storage. You load this string next time you load the game. That should solve everything, that would be my approach to this.