lionz's Forum Posts

  • Ok, to be more simplest. Let's forget (just example to explain you) the second value after comma. So let's imagine we have 3 arrays.

    Array1 = Question

    Array2 = Answer

    Array3 = Result

    So, Array1 values start from 0 - Array1.width

    This means, we start to detect from Array2:

    Array2(0) -> Start detect each value to all position of Array1.

    So from my latest example, Array1 have "E" to 1 position.

    And our answer (Array2) "Ε" was in 0 position of Array2.

    What means?

    Array3 (or Array 1 after comma, whatever) will give us result: 2

    I hope make sense now! If you check all my previous examples is exactly the same thing i try to explain all the time. Sorry for the misunderstanding.

    And some fast examples:

    Array1 => YES

    Array2 => YES

    Array3 => 111

    Array1 => YES

    Array2 => YSE

    Array3 => 122

    Array1 => YES

    Array2 => NES

    Array3 => 311

    Array1 => YES

    Array2 => ABC

    Array3 => 333

    This makes sense and I understood it as this and it was the results that my example gave but you said they were wrong and H should be 2 and E should be 3. Now you are saying E should be 2. There is confusion.

  • So "Array1" after comma is our final result.

    From my latest example in the first position we write "E" so from the Array1 need to check from 0-Array1.width... if "E" exist or not.

    This sounds like the reverse of what your original post asks. Checking if array 2 entries are in array 1, what ?

  • On the platform behaviour for Player 1 you disable/untick 'default controls'. Then you can create your own events such as A and D for moving and W for jumping with actions from the platform behaviour.

  • On Construct 2? With great difficulty I would imagine. Try Construct 3! :D

  • If you're trying to say that it counts as not existing if it comes at an earlier position in array 2 then that makes sense for E but how can H be 2 if it doesn't exist in the second array? I am going to give up on this for now, you seem to understand where I am going with the logic so you should be able to adjust it.

  • The condition 'is showing' means when the award is showing on screen so you grant the reward as the advert displays on screen which is not what you want. You should be using the conditions 'on rewarded complete' and 'on rewarded cancelled' which should be self explanatory.

  • Ok take a look at this attempt. I use a third array because of this duplicate business. dropbox.com/s/8dnnzqugt6y877d/arraychecks2.c3p

  • Condition is 'object is playing animation' and the action is to set a variable to object.pickedcount

  • It will work perfectly if there are no duplicate values, for the duplicates the function logic needs tweaking a lot. I will take a look if I get some spare time or feel free to have a think about it.

    About the game design, how do you know the second L is the one missing from the second array if they're identical values, is it always checking in the order of array 1 ? Technically L does exist but you want to output 3.

  • Alright I had some free time dropbox.com/s/se6or865jefqh5c/arraychecks.c3p

  • I posted the solution already, what did you try ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you push a new item the X is array.width-1 so you can use that to assign everything at x,y (array.width-1,y)

  • The problem is it's not clear what you're asking. what does this mean? "How can I make this event only play once? (Set Y, and then leave the player on its own again ¿?)"

  • The layer is more of a global thing. When you restart it sets objects back to their initial states, and I think groups in events.

  • Because the walk animation and the fire animation are true at the same time then both animations are trying to play. So you must block out one of them with a condition.

    So on the walk events you must add a condition like 'is not firing'. In the case of your game this could be one of the variables since you use them for firing. You could possibly also use 'rifle shoot animation is not playing' as a condition, it depends on the logic you set up.

    The key is to not allow the events to be true at the same time. If you are firing then the walking animation should not play, hence the walking animation event should be 'play walking animation when pressing WASD if you are not currently firing'.