Laurent's Forum Posts

  • In my game, I ve a dialog display system showing the text in a box that contains 3 lines. Text to display maybe more and I'd like display part after part when space bar is pressed.

    I've made a test offsetting the text when bar is presse but it doesn't work (overflow text is not displayed).

    I'm not looking for a visual scroll system, just a system showing the first part of the text, then erase text box and fill it with the rest of the text.

    Here's a simple design

    and here my attempt code

    https://www.dropbox.com/scl/fi/onn4rqfe4mepzc87ckp0n/ScrollText.c3p?rlkey=r6cn2nzifjvr05ok5ea9h2hvv&dl=0

    Tagged:

  • Wow ! Thank you very much !

    Another question : I'd like to insert a "tick" noise, like in a safe knob' everytime wheel rotates. How can I do that ?

    SOLVED

    OK, I did it. In the 'every tick" group, I added a variable and gave this variable the current wheel angle value before the Wheel angle is rounded. Then I add a block comparing this variable with the Wheel angle and play a sound when values differ.

  • In a project, the player can use drag and drop to rotate wheels on screen to make combinations.

    There's a graduated circle around the wheel with graduation every 10°. Instead of a fluid rotation, I'd like to constrain rotation to steps of 10°, ie wheel's angle should be a multiple of 10. Here's the link to the project to help :

    dropbox.com/scl/fi/a4srr9gvq4f4qni8j4dw3/RotatingWheel.c3p

    Tagged:

  • LaurentYes, here: editor.construct.net/beta

    Thank you ! I understand better

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is a very interesting conversation you have here and it is very technical, a level I haven't reached yet. So far, I have issues figuring out how the flowchart can be used and be useful. Is there an example c3p file somewhere ?

  • Use a calculator:

    (mouse coordinates-tilemap position)/tile size

    Sounds a good workaround :)

    Adding a feature in construct to help with this would be a good idea, Ashley

  • Question for editor mode.

    I have laid a tilemap (150x150 tiles)and would like to know the coordinates (in number of tiles coordinate) of a specific tile. how can I know that ?

    For pixel coordinates, there's a inspector giving real time mouse coordinate on the layout. Is there something similar for tile map ?

    Tagged:

  • I would drop an invisible rectangle sprite A on the layout, generate random X and Y coordinates so that

    x=(layoutWidth/2)+round(random((layoutWidth*-1),layoutWidth))

    y=(layoutheight/2)+round(random((layoutheight*-1),layoutheight))

    Create sprite where location (x,y) doesn't overlap sprite A

  • You may be changing speeds too abruptly.

    If you do it with "lerp", it will be softer.

    Thank you ! It is actually well better ! Would you have a sound to advise to use to match the sound of paper sliding on wood ?

  • Hello,

    In my game, player can drag objets (paper leaves on a wooden desk) on scree. I'd like to add sound to the movement and this song speed will be related to object drag speed.

    I made a test file that works not so badly except sound play is a bit erratic. I tried with ponctual and continuous sounds (both are in the project).

    Any idea I could render this a bit more realistic (remember its all about paper being dragged upon a wooden desk).

    https://www.dropbox.com/scl/fi/cpzsa4i96y077bsei9avo/Test-Drag-Sound.c3p?rlkey=u82ojllmdrxg8uk846uzn71cz&dl=0

    Tagged:

  • Thank you for this :)

    I dropped the idea of sliders and adapted your logic with bands that the user can modify the height.

    Here is a cap :)

  • Thank you very much !

    Your code is very intriguing and I discover some coding sorcery I didn't know about and that I try to understand the logic, like this line :

    -> Text: Set text to tokenat(Slider1.Value&","&Slider2.Value&","&Slider3.Value, Self.IID, ",")

    I also went to css style the sliders and couldn't find how to change the thumb for a png.

    I tried this, with "smile.png" stored in the project Files folder but it didn't work (maybe the smile.png is not pointing to the folder) :

    background-image: url("smile.png");

  • Awesome !

    Thanks to your help, I manage to make it work :)

    I tried to adapt it so moving slider_a changes slider_b and slider_b. But I want the Slider_c only to change Slider_b but couldn't get it.

    https://www.dropbox.com/scl/fi/q53hxwmxo44fw9iz7vmb0/Potion-Craft.c3p?dl=0&rlkey=6bjdylw3h2rzp9fytr4aujypi

    | Global number Delta‎ = 0

    | Global number k‎ = 0

    + Slider_a: On changing

    -> System: Set Delta to Slider_a.Value+Slider_b.Value+Slider_c.Value-100

    -> Slider_b: Set value to Self.Value+Delta÷2

    -> Slider_c: Set value to Self.Value+Delta÷2

    -> System: Set Delta to min(0,Slider_b.Value,Slider_c.Value)

    -> Slider_b: Set value to Self.Value-Delta

    -> Slider_c: Set value to Self.Value-Delta

    + Slider_a: On changing

    -> System: Set k to (100-Slider_a.Value)÷(Slider_b.Value+Slider_c.Value)

    -> Slider_b: Set value to k×Slider_b.Value

    -> Slider_c: Set value to k×Slider_c.Value

    [Slider_b]

    ----+ Slider_b: On changing

    -----> System: Set Delta to Slider_b.Value+Slider_a.Value+Slider_c.Value-100

    -----> Slider_a: Set value to Self.Value+Delta÷2

    -----> Slider_c: Set value to Self.Value+Delta÷2

    -----> System: Set Delta to min(Slider_a.Value,0,Slider_c.Value)

    -----> Slider_a: Set value to Self.Value-Delta

    -----> Slider_c: Set value to Self.Value-Delta

    ----+ Slider_b: On changing

    -----> System: Set k to (100-Slider_b.Value)÷(Slider_a.Value+Slider_c.Value)

    -----> Slider_a: Set value to k×Slider_a.Value

    -----> Slider_c: Set value to k×Slider_c.Value

    [Slider_c]

    ----+ Slider_c: On changing

    -----> System: Set Delta to Slider_c.Value+Slider_a.Value+Slider_b.Value-100

    -----> Slider_a: Set value to Self.Value+Delta÷2

    -----> Slider_b: Set value to Self.Value+Delta÷2

    -----> System: Set Delta to min(Slider_a.Value,Slider_b.Value,0)

    -----> Slider_a: Set value to Self.Value-Delta

    -----> Slider_b: Set value to Self.Value-Delta

    ----+ Slider_c: On changing

    -----> System: Set k to (100-Slider_c.Value)÷(Slider_a.Value+Slider_b.Value)

    -----> Slider_a: Set value to k×Slider_a.Value

    -----> Slider_b: Set value to k×Slider_b.Value

    + System: Pick Text where Text.name = "a"

    -> Text: Set text to roundToDp(Slider_a.Value,1)

    + System: Pick Text where Text.name = "b"

    -> Text: Set text to roundToDp(Slider_b.Value,1)

    + System: Pick Text where Text.name = "c"

    -> Text: Set text to roundToDp(Slider_c.Value,1)

  • My Game is about making potions with 3 ingredients.

    Proportion of each ingredient is given by the player by moving 3 sliders.

    And of course, sliders needs to be connected so that when a sliders moves and that the sum of the 3 values exceed 100 %, the other sliders move so that 100% is never exceeded.

    Any idea on how to achieve this ?

    Tagged:

  • Thank you both for your replies.

    I guess I have to be more specific about the way the game works :

    - Game is time related

    - Every action from the player takes time : 0.33s, 0.5s or 1s Time is in seconds.

    - There's a pnj on the game screen that moves everytime a second has passed.

    Thus, I need to be able to check if a whole second has passed to give the PNJ the order to move 1 distance unit on screen.