Braus's Recent Forum Activity

  • Braus

    Sure, why not? In the capx it calculates the initial speed so it rotates n degrees. It's done when the speed is >= to 0.

    So you'd either figure out the number of degrees from any position to any other, or find a formula that can do that.

    I got it. I just need to fix an issue with the area corresponding to the place 1 (all the restante are okay). How to check if the spinner is over this place if the first angle of this area starts at 330 degrees and finish at 30 degrees. I tried "within 60 of 30" but it nor worked.

    Other question:

    If I use sqrt(2*50*(360+int(random(6))*60)) I cannot apply more speed at the beginning?

  • Thanks. I saw that you exchange all the sprites for one and use instances of it with an id (nID). I have used several sprites because I need to check another order besides the crescent. Can I also check the reverse order using the same solution?

    Why I cannot make the comparison in this way:

    Array2 value at 0 = Sprite1.AnimationFrame

    Array2 value at 1 = Sprite2.AnimationFrame

    Array2 value at 2 = Sprite3.AnimationFrame

  • Please be specific. Right now the code looks to see if any number in the array matches, which makes no sense. That's why you need to be specific. Do they need to match from index 0,1,2, or match the sequence anywhere in the array? Very different code.

    Always the sequence of the array (Index 0,1,2,3,4,...).

    On the left of the screen you can generate the random numbers and when you click in "show" the game show you the sequence (the first three numbers of the array). I will use 3 number at the beginning and I will increase this amount during the game.

  • Sorry, I thought it was clear. Check if the sequence is right. If each frame is right it will add 1 to the "hit" if the player got 3 hits, something happens.

  • Very nice. Thanks a lot.

    In my case, I need that the spinner stops in pre defined places, following a sequence that could be different each time: 1,3,5,4,6,2,6,6,3,1 or 4,2,5,4,1,6,3,1,3,2 or 6,1,4,2,3,5,2,2,4,1 or ...

    Is it possible?

  • Again, you need to post what you have. A function should make no difference.

    Ok. Here it goes.

    [quote:28d1tk34]https://www.dropbox.com/s/5xshuvuyp6q6ngw/test.capx?dl=0

    The checking system is not working and it's also not recognising the number 10.

  • It doesn't use a behavior at all. Here's a working example of the idea:

    https://dl.dropboxusercontent.com/u/542 ... ette2.capx

    This is very cool. Thanks man. I fixed the first script and it works (with no behavior)

    What I need to do if I want that spinner starts with more speed?

    How I know when the spinner stop? I have checked and it stops with -0.(some numbers) of speed. Why it is not zero?

    I need to manage the spinner to stop where I want. It starts in 0 and goes to 45/108/165/226/283/340 degrees.

  • Hey blackhornet

    Thanks for the example. It's similar that I am doing here. The only difference is that I am using a function to check if the array values are equal or not to the animation frames. Seems that the loop stops in the first value.

    Function On "check"

    For "" from 0 to 9

    Array Value at loopindex = Sprite1.AnimationFrame (action)

    Array Value at loopindex = Sprite2.AnimationFrame (action)

    Array Value at loopindex = Sprite3.AnimationFrame (action)

  • I juts want to check if the array value is the same of the sprite animation frame (comparing the frame of one or three sprites at the same time) and I want to show the animation frame according with the array value (anyone that I want to show).

  • So I can do:

    Array Current value = Sprite1.animationFrame (action)

    Array Current value = Sprite2.animationFrame (action)

    Array Current value = Sprite3.animationFrame (action)

    But if I not use the "for each element"? if I need to set a frame using an array value? Can I do that:

    Sprite3 Set animation frame to Array.At(5)

    If so, I don't know why it's not working too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Array.CurValue = Sprite1.animationFrame

    Hey blackhornet

    But if my array have 10 values how can I know the current value?

    Sometimes I will need to compare 3 numbers, so it's wrong:

    Array value at 0 = Sprite1.animationFrame (action)

    Array value at 1 = Sprite2.animationFrame (action)

    Array value at 2 = Sprite3.animationFrame (action)

  • I am randomising 10 numbers (1-10) in a array and I need to compare some of these numbers with the animation frames of the some sprites. This amount is changing during the game (1st time = 3 numbers / 2nd = 5 numbers / ...)

    My code:

    Function

    Array For each X element

    Array value at 0 = Sprite1.animationFrame (action)

    Else (action)

    But it's not working . What am I doing wrong?

Braus's avatar

Braus

Member since 17 Jul, 2015

None one is following Braus yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies