lionz's Forum Posts

  • It knows when the keys are released because your logic says when 8 direction is not moving then set the animation to an idle animation. Because you just released for example W then you character will want to face up so it will play the up animation and it will have a variable set related to when W was down.

    For the key logic you do something like :

    W is down - set variable to 1

    D is down - set variable to 3

    W is down AND D is down - set variable to 2

    You do an AND by adding both conditions together on the same event

    Use a global variable, not a local variable.

    The idea is when you release a key, the last key or keys that were down will have produced a variable. If you were holding W(up) and released then the variable will be 1 etc. That variable then relates to an animation.

  • You can search for "table tennis" as easily as you can search for "tennis" so not sure what you're doing wrong...

  • Sounds like you know what you're doing but key release is problematic there. I would do it on key press rather than release. Set up logic such as, if W pressed set variable to 1, if D pressed set variable to 2. If W AND D pressed set variable to 3 etc

    Then you have your current logic inverted 8 direction is moving, set animation to "variable" where variable could also be the name of the animation to cut down on events. For example if you called them idle1 idle2 idle3 you could say set animation to "idle"&variable

  • You do not have permission to view this post

  • Else : set global var to 0

  • You do not have permission to view this post

  • How experienced are you with Construct because so far this sounds like you just created some text boxes in a layout? You can push the stories to the back of an array and use array data to limit what is shown in title and story lists.

  • There are a few things you can do to tidy it up. Maybe the collision box doesnt have to be all the way around the object and you can limit it to a very tiny area that matters? You can also give the block that is falling a variable that is set to distinguish it and make sure it is only picking that object for collisions and not all blocks in the level.

  • Put some invisible objects on the key areas at the corners, and when you overlap them, set a variable on the object to true. If all objects linked to the main object have variable true then destroy it. If the timer expires, set all variables back to false. That's how I would do it but there are other ways...

  • Is the text "16" and has the other logic been actioned, such as does the audio turn off and are the objects destroyed? This problem is kind of hard to work out from the screenshot though, maybe you can share a file? Thanks

  • Hey, it's because 2 of those are always going to be true at the same time and you can't simulate in 2 directions at once, it picks the last events as they run last so up/down. You'll need to apply some different logic for that so for example when the Y is the same then it starts adjusting the x to move left/right.

    To stop and attacking you can use distance(player.x,player.x,enemy.x,enemy.y) is a value, and when it hits that value you set the enemy to a different state. This could be an instance variable that changes between 'moving' and 'attacking'.

    Then for the movement logic you add a condition, enemy.state is not 'attacking'. This allows the enemy to stop moving and attack instead.

  • Second problem is resolved by using Families, it is a way of saying 'any enemy'. You put all enemies into a Family and things like hp becomes a Family instance variable, so then you say Family on collision with combo, subtract 4 from Family.hp and this applies to all enemies.

  • OP said is adding a turret target based on LOS behaviour so it's possible. Kind of a redundant use of LOS behaviour though unless it's to make use of cone of view.

  • On LOS behaviour set obstacles to Custom instead of Solids.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads