Laurent's Recent Forum Activity

  • Thanks rojohound !

    do you mean I should give the slider a variable called oldY ? (is the word "variable" missing in your first sentence ?)

  • In my game, I made a custom slider with a sprite vertical bar and a sprite slider.

    SLider moves on the bar through constraint drag behavior with a step of 10 pixels, meaning the dragging is not fluid. I'd like to play a ticking noise when the slider moves step by step. How can I do that ?

    I thought of having a listener listening for the slider Y coordinate to change and then play the sound.

    I tried many different approaches but no success.

    How can I do that ?

  • You do not have permission to view this post

  • That's perfectly clear ! Thank you

  • Thank you !

  • Hello;

    I'm building a game where screen information are stored in a JSON.

    First screen loaded is "screen_1" on which links can lead to other screens. When a link is clicked, next screen name is stored in a variable nextScreen and I'd like to perform a search in the JSON to check which level is this next screen and display according information

    Here is the JSON

    {
     "screens": [
     {
     "id": "screen_1",
     "elements": [
     {
     "type": "text",
     "id": "instructions",
     "content": "Screen 1 flashing section egestas."
     }
     ]
     },
     {
     "id": "screen_2",
     "elements": [
     {
     "type": "text",
     "id": "instructions",
     "content": "Screen 2 flashing section egestas."
     }
     ]
     },
     {
     "id": "screen_3",
     "elements": [
     {
     "type": "text",
     "id": "instructions",
     "content": "Screen 3 flashing section egestas."
     }
     ]
     }
     ]
    }
    

    So far I managed to load the JSON correctily using AJAX. I can display info using the correct path but I've a hard time building the loop "for each" that search the next screen name through the JSON and display related information.

    I tried to add to the foreach loop something like :

    {...}JSON - For each entry in "screens"

    System - JSON.Get ("screens."&LoopIndex&".id") = nextScreen

    but it doesn't work...

    Tagged:

  • Hello,

    I saw that "BBCODE tag ranges" example makes it possible to make a word in spritefont react to touch.

    But I'd like to set up a function that click on a word triggers an action.

    I though of something like a tag that would tell every word with this tag acts as a button (ie [tag=button] but another tag would be useful to indicate an ID to that button. Or maybe some regex could be involved to decrypt a tag in the form [tag=button/3].

    Then, using a json to connect ID with an action, I'd be able to trigger a given action with a click on given word.

    Any idea how this could be achieved ?

  • The solution with one loop is very interesting but thank you for explaining how to use wait with two loops. May comme handy in the future

  • Thank you very much ! It is a very elegant solution that really matches my needs !

  • I have a routine with 2 loops to create a grid from 8x10 pixel Sprites. It works but I'd like to add a Wait function so that the sprite appear one after the other.

    Where and how should I add the wait ?

    Second question, I'm sure this grid generation fucntion could be made with only one loop. An idea ?

    Thanks !

  • Thank you !

    I found this tutorial that allows unique value and shuffling in only one line !

    https://www.construct.net/en/tutorials/shuffle-array-boss-easy-event-2396

    I'll consider your suggestion for filtering and adding value at the end of the array.

  • Hello,

    I have an array with only dimension X.

    I want to populate each of its 50 cells with a unique number from 1 to 50. I also want number 25 to falls after cell #20.

    How can I do that ?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Laurent's avatar

Laurent

Early Adopter

Member since 18 Jan, 2012

Twitter
Laurent has 1 followers

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies