lionz's Forum Posts

  • Maybe I explained myself badly, I don't want the first 2 rows of the array, fortunately I know how to show them :D

    I would like that by typing the letter P the first text finds me Pear and the second Potatoes.

    instead now when I type P it finds me only potato, while in the list it finds Pear

    Find? Meaning what? Yes it's badly explained.

  • This is why I rarely share files because you end up with a bunch of events you don't really understand, for me that's not the way to learn Construct. It is not reversing any order you just put the action in a loop so it will run until the last element is found. If you want to show elements 0 and 1 from the array then do as I mentioned above outside of any loop or function.

  • You shouldn't set those text inputs inside the loop or inside the function. To be honest it's not clear what they are for. If they are there to show the first and second value of the array then its array.at(0) and array.at(1).

  • There are a few other options, if changing the object's angle doesn't cause any issue you can enable Set Angle on the 8direction behaviour and the object's angle will also change with the movement and the original events you have should work as it will keep the last angle.

    Another is to grab the 8 direction movement angle on button release and save it in a global variable, then use this to compare.

    Another is to use the walking animation that is playing as the object stops. If walk right animation is playing, then set to idle right.

    Also if you are only using 4 directions I don't think you need to use 'is between' condition it should be the same 4 possible values.

  • You are using the 8 direction movement angle in the other screenshot so it would be the same. It's strange that you changed it at all if it is already working for walking.

  • One screenshot is using the object's angle and the other is using the 8 direction movement angle, they are two different things. Probably you want to change the object angle conditions to 8 direction angle. You can make use of 8 direction without ever adjusting the object's angle which may be what's happening here. Check in debug if the object's angle is changing or the value of 8 direction movement angle.

  • This is a common issue where multiple animations are trying to play at once. You have to use conditions that make sense to ensure that none are played at the same time. For example here you are trying to play 'attack' and 'walk' at the same time, so you have to add a condition on the 'walk' event such as 'attack animation is not playing', this allows attack to play and then return to walk once finished instead of trying to play walk anim at the same time.

    edit : I misread the animation it's 'hit' when an enemy gets hit by something but the same logic applies, you add to the walk animation event a condition like 'hit is not playing'. Also the ogre should die because receiving damage should be separate from the animations, such as 'bullet on collision with ogre then take damage' rather than on hit animation played.

    For falling through the floors and strange bugs around that, take a look at the collision box of the ogre in the image editor, make sure it's a box and not a random shape based on the image.

  • Well there's a sandbox environment specifically for testing these things before you submit it for review or before releasing to production. You download it from a test link. That's on the Google side not Construct, it's part of the process.

  • In general what you are looking to do is compare text with an expression - find(array value, text input) will look to see if the text input value exists in the array text.

    You would use system compare two values - find(array value, text input) is the first value and then you would say 'not equal to' and -1 is the second value, this now returns true if your text entry is contained in the array value. You would replace array value with array.at(loopindex) when it is put inside a loop to run through the rows of the array.

    On the action side of the loop to filter the elements it depends how you are using the array and selecting its elements in the game. You could delete the row if it doesn't match, this would mean changing the condition above to 'equal to -1', then you would be left with only matching values.

  • I don't think you need to wait for approval to test that?

  • Add an extra condition like 'pick nearest to character'

  • If the attack animation is one frame then it would be like it is attacking and walking.

  • Do you mean restart from when it was last saved? Usually it would load the game in the same state it was before, if enemies weren't following the player when it was saved then they shouldn't be on a load. There's no way for us to guess why that's happening either, you would have to share the project.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can put Scroll To behaviour on all teammates but disabled for all AI. Then when you die, you can enable each Scroll To behaviour in turn which would focus on that teammate object. You jump from each teammate enabling their scroll to while disabling the others in sequence by using a numbered instance variable ID.

  • System : every 1 second - add 1 to a global variable (score)