Doupi's Forum Posts

  • 3 posts
  • Hi there,

    This is my setup

    In my application I have 2 Array classes - Category and SubCategory.

    When I create a new entry in the Category, I create a new SubCategory.

    The Category contains the names of all SubCategory. The SubCategory contains a bunch of a data.

    The SubCategory array has a variable with a name (from the Category array).

    My Category Array classes exists all the time and the SubCategory class is created on an event.

    In some events I save the array's data to a LocalStorage plugin - a single key for the categories array, and multiple keys for the multiple SubCategories.

    When I reload the application I

    - Load the data from the Categories key to the Categories array (with localstorage)

    - Run for a Category each X element loop to create the SubCategories and give them names

    Everything to this point works as I want it to.

    And here is my problem:

    I can't find a way to load the data from LocalStorage to each NEWLY created SubCategory.

    The SubCategory has the right name as a variable. And that name corresponds to a key in the LocalStorage.

    I tried to run For Each SubCategory, check SubCategory.Name exists and if it exists load data, but it seems the "if it exists" event is triggered only once, because only of the SubCategories gets loaded.

    Any ideas how to make this setup work suggest a better way to save/load stuff. I am working on Construct 3.

    Thanks a bunch!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am making a billiard kind of game and I would like to use this physics example as a "pocketing" mechanic for the balls. The thing I'm having trouble with is that the balls are circling around the hole. I would like the balls to be directly sucked into the pocket when they are overlapping it and stop in the center of it. Should I try and use and modify the black hole example in this thread (if so please help me), if not what kind of technique should I use?

    • The pocket hole is in the middle of the board
    • I am using Physics for moving the balls around the table.

    Thank you in advance!

  • Hello there,

    I'm making something like a two player pool game, and I would like some help for creating the shooting mechanic.

    Here are some troubles I'm facing

    1. When I try attaching a physics enabled object to the mouse, if the mouse is moving too fast, often the mouse might get in front of the ball and stop it. (I've enabled the Bullet option in the physics options.) Basically I want the ball to be able to go really fast when being hit really fast.

    2. I'm considering another mechanic which is a cue that's being attached to the currently active "shooting ball". I want the cue to rotate around the active ball at a fixed distance when you are moving the mouse. If a mouse button is pressed the angle of the cue should be fixed and you should be able to move the cue only towards and away from the active ball.

    Thanks in advance for the help!!!

  • 3 posts