lionz's Forum Posts

  • Yeah you can pick them out with different instance variable values if they do different things. Depends what exactly they are used for. If you want to display text you can set the text in an instance variable on the object itself and say on object clicked > display text object.text

  • I see ; I will try what you propose ! R0J0hound.

    lionz

    My understanding is, "On object clicked" should be accompagnied with another condition that specify WHICH instance was clicked, isn't it ? Because each instance has a specific causal effect, so the rest of the code must evolve accordingly to which specific instance was clicked.

    Am I being clear ?

    Nope it just picks the one that was clicked. The actions next to it only apply to that one instance.

  • > If it is based on which one the player clicks, you can use the condition 'on object clicked' under the Mouse object conditions.

    Hye !

    yes, I know about that condition ; my main problem is to identify WHICH object is clicked, since there's only one object, but many instances of it. Each instance should not have the same result ; hence my need to be able to identify every instance individually on runtime.

    'On object clicked' picks the instance that you clicked, then when you run actions it will be on only the instance that was clicked.

  • If it is based on which one the player clicks, you can use the condition 'on object clicked' under the Mouse object conditions.

  • Probably what you are looking for is the ScrollTo behaviour. Add it to the player object and the camera will follow the player.

  • Yes, was thinking that could be a fix, wouldn't be too difficult.

    And that might help me establish other variables easily with an (on created) for the cards too if I load them up somewhere

    Hoping to understand why it wouldn't create an object with the instance variables set though.

    Think of it less of a fix and more just that's how Construct works. It needs the initial instance to get info from. Or you can set 'on created' if you are applying to each instance manually.

  • Yeah that works. You removed the is playing check and instead added it in the same event with a wait so that's another way of doing it. They key thing is each event is a trigger once type event!

  • The top event you added runs constantly and overrules a lot of the events, as a habit you shouldn't really put trigger events (green arrow) as sub events. To fix this, delete the 2 duplicated events you won't need them, and bring the 'is animation playing' up to the main level not a sub event. Then for the two 'is animation playing' events you add the condition directly to each one if direction_left is true, and one where direction_left is false.

  • Put enemy and gun in a 'container'. Check the manual.

  • Sure then try the above. Every tick isn't going to work nor is it needed here. You can run events based on animations finishing. There is also a Timer behaviour option but I think anim events could work for now, try it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I made use of an array or the array file which basically is a spreadsheet. Then using a global variable you can switch between a column for each language. Then the rows represent the same dialogue but in different languages across. An excel file could be used outside of Construct then imported and used in the array also, but I used the array file within Construct.

  • Because what you're describing is animation based, at a basic level you can make use of 'on animation finished', so 'on Idle animation finished' set animation to hop. 'on hop animation finished' set animation to idle, to flick between them.

    The problem here is when you say hop to the left it sounds like movement and with that logic he won't move so it's up to you how much he moves. What does hop once mean in context of your platformer ? He moves a little bit and plays hop ?

    If he moves only when the hop anim plays one time then you could still make use of animation events, so 'is hop animation playing' then simulate control on the frog.

  • Are you asking how to make a HUD that scrolls with the player? You can put the UI on its own layer that doesn't scroll, set parallax to 0,0

  • Yeah I've had zero luck with this also. What lionz recommends sets the angle of the bullet SPRITE, but does not change the angle of motion.

    If you try to change the angle of motion, the script only allows for a single number (angle), and won't let you input Mouse.X and Mouse.Y.

    It seems that spawning a bullet, the bullet will match the angle of the object that spawned it and travel in the direction (that's how it works in the Ghost Hunt tutorial). I've yet to figure out how to take a stationary object and spawn a bullet that flies towards the pointer.

    What I suggested works if you have 'set angle' ticked on the bullet properties, which is the default. If you unticked then it won't work, it will just change the angle of the object and not the angle of motion with it.

  • On the action where you spawn the bullet, add another action using the bullet object 'set angle toward position' and set the values to mouse.x and mouse.y. You will need to add the Mouse object to the project also before doing this.