lionz's Forum Posts

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

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

  • Try Construct 3

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

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

  • Well you're in luck as there is a new feature called Z elevation which might be useful in providing an illusion of jumping, it allows an object to change its Z so it looks like you're jumping towards the camera, or platforms are lower in the space :

    Z elevation

    The instance's elevation on the Z axis. By default the camera is at Z = 100, and looking down to Z = 0. The default Z elevation is 0. Increasing it will move it upwards (towards the camera) and decreasing it will move it downwards (away from the camera).

    youtube.com/watch

    If you don't want to use this, you would just mimic it with an animation and scaling the character.

    In terms of dodging projectiles you would have a state where player is jumping on a jump key pressed, not like in platform behaviour, for this you would have to create your own variable isJumping and toggle it on and off. Then you would say when player isJumping, disable collision on the player. This would mean that enemy projectiles no longer touch the player. You could also do it the opposite way, projectiles do damage or explode if projectiles overlapping player and player is not jumping.

    As you are unsure of the design yourself I guess that makes sense why the original post is confusing. To have a 2D side scrolling beat em up combined with a top down 2D RPG doesn't make too much sense. But the information above should help you to mimic jumping from a top down view.

  • Thanks for explaining the game a bit more, so you just need to create a solid object to go where the green is displayed. It doesn't do anything it's just a solid sprite that you position there. For the score you can create an invisible object that stretches across between the two solid sprites and say ball on collision with object, add 1 to score variable. This will mean when the ball collides with it and drops into the basket you gain +1 score.

  • If it's a basketball net it shouldn't move right? :P You can use the pin behaviour to pin it to the basketball net sprite. If you are using the object purely to detect a ball hitting it then I don't think it will matter too much.

  • You can create a separate object to cover the green area and make it solid, will that work?

  • If an object is made up of several objects you are meant to use 'containers'. You put the 2 objects into a container and when you create the base, the unit is also created with it and they can be picked together. It is the same as if you were to create a tank made up of a base and turret and want them to move together. If it isn't like this then please share more information about the game.

    construct.net/en/make-games/manuals/construct-3/project-primitives/objects/containers

  • It's difficult to tell what purpose a jump mechanic would have in your game. In the kind of game you're describing it would be a jump animation for the character with the shadow included in the animation but in those kind of games, you don't jump. You could do something like move with 8-direction or the tile movement behaviour in a direction and play the animation.