Johann123's Recent Forum Activity

  • Its a little confuse because the names are not match but, On start of layout request the txt file it has the number 10 inside.

    As you can see at the first picture $file = "your txt file name that include the number 10"

    At the 3rd picture you send the data to the php file, change the name to fit your php file.

    Sorry for the mess....

    Thanks for guiding me, I will try to see how I can work my ways around your code!

  • > Would you mind explaining how you are calculating where the sector lands?

    I am not calculating where it lands, I am telling the wheel where to land. It makes 5 full spins + the angle required to land on a specific number.

    You can change the number of pies in SectorCount variable.

    That explains alot, thanks I think I finally figured it out! as 360*5 = 1800 + the angle of the number it lands on.

    Edit: If I were to change the indicator to the top like so:

    Which part of the code would I be modifying for it to start at "50"? As currently, once I click the start button, 50 goes to the right side before it starts spinning.

    Edit again: Nevermind, just realized rotating the wheel itself doesn't actually change it in the animations editor.

  • Did you see the demo I posted in your other topic?

    https://www.dropbox.com/s/urehb4tsgeq816j/WheelOfFortune_Predictable.c3p?dl=0

    You can tell the wheel to spin to exactly the chosen number, and the result will be the same on any device.

    Would you mind explaining how you are calculating where the sector lands? Now assuming instead of a 18 pie wheel, I only have a 8 pie wheel, which part of the code would I be playing around with? I don't really understand how tween works hence I'm ultra lost at the bottom part of the code.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Did you see the demo I posted in your other topic?

    https://www.dropbox.com/s/urehb4tsgeq816j/WheelOfFortune_Predictable.c3p?dl=0

    You can tell the wheel to spin to exactly the chosen number, and the result will be the same on any device.

    I did, thanks I think I'm going to use build my components off your project. Thanks for the guide, will be playing around with it!

  • Hi guys, now imagine that I have a really simple spinning wheel, and when a button is clicked, it generates an int(random(1,8), which randomizes the number between 1-8, and if 1 is selected, it'll stop at "1", and if the random number is 4, it'll stop at "4". Currently I'm just setting the rotate speed like this:

    This is the image of the wheel:

    The problem is: When I'm spinning the wheel on different devices, (Tested across 3 different screen sized mobile phone) the arrow always points at a different place. Is it possible for the results to be fixed across all screen sizes? If so, can someone provide an example for me or point me in the right direction? Thanks!

  • Good morning,

    As i remember you need only read and post.

    Please give me some hours to get home , i remember i have a C2 project at my pc that will help you.

    Good morning, that'll be amazing thanks you!

  • Using post php can do the job.

    I'm still wondering why you want to stop users playing your game. 🤔

    And may I ask why post PHP and not get? Should I not be getting the data from my database tables using GET request?

  • Using post php can do the job.

    I'm still wondering why you want to stop users playing your game. 🤔

    It’s because I’m distributing prizes to them, and I only have 10 prizes, so the first 10 players to meet the criteria will receive the prizes, and once the global variable hits 0, no one gets to play as I won’t have anything else to distribute out.

  • Use Local storage plugin

    Then "at the start of the layout"-->access the saved data

    if the accessed data is bigger than 0-->subtract 1 from it and save it back and continue the game

    else-->do not play the game

    I am attempting to make it so, once the variable is changed, when a different user plays the game it picks off from the new data, so I don't think local storage would work, let me know if I'm wrong but from my understanding, local storage only works on the same user's PC, and if another user is accessing the game the variable resets.

  • Hi guys, I’m wondering is it possible to read my global variables from a database? For example, by setting my global variable to “10”. No matter who is playing my game the global variable is set to “10”. I want to make it so after each time a player plays my game, the global variable is deducted by 1. So from 10, it goes to 9,8,7.... until 0, and I’ll have a screen where if Global variable == 0, no one can play anymore. So the way I thought of is by creating a database table, and storing my variable as “10” in the table, then after each play I will subtract 1, and update the data to the table, so when the next player plays it reads the updated data which is now 9. Or is there any other simpler way of doing this?

  • Hey,

    I am trying to make a wheel of fortune (lucky wheel) game, where there are 8 prizes (Refer to image below).

    Now I'm using construct.net/en/forum/construct-2/how-do-i-18/spinwheel-wheel-fortune-124258 this as a guide, and currently there are the probability of the pointer landing on the each of the boxes is exactly 12.5%, which totals up to a 100% (fair chance). Is there any way I can change this probability without changing the size of the wheel? (All sizes of the wheel remains the same, but altering the chances to something like (The probability of landing on "1" is 50%, 2 is 20%, 3 is 10%.. etc.

Johann123's avatar

Johann123

Member since 18 Jun, 2020

None one is following Johann123 yet!

Trophy Case

  • 4-Year Club
  • Email Verified

Progress

5/44
How to earn trophies