Maverick1912's Forum Posts

  • Use choose("car", "truck", "bus") & ".png" in your URL.

  • Why don't you make it with revert way?

    - You have the name of the png.

    - Have variable call nameOfImg.

    - Load Image from URL with the path is nameOfImg&".png"

    - Then you display the nameOfImg in text.

    - And the nameOfImg can be random like choose("dog", "cat").

  • When you run in debug mode, you will see the array only has 1:

    x: ,,,,,

    y: all you rgb

    You must edit your JSON file.

  • You can make a parser to do it. There are many ways to do that depending on what you want to do.

    Fist step is to get a list of tokens (numbers and +- or ^)

    A simple way to do that is with a series of replaces so what you end up with is a list of tokens divided by spaces.

    Then you can loop over them and make that substitution with something like this:

    var text = "2^3+4^6
    
    Set text to replace(text, “ “, “”)
    Set text to replace(text, “+”, “ + “)
    Set text to replace(text, “-“, “ - “)
    Set text to replace(text, “^”, “ ^ “)
    
    var output= ""
    var i=0
    var n=tokencount(text, " ")
    
    while i<n
    -- add 1 to i
    -- if tokenat(text,i," ")="^"
    -- -- add "pow("&tokenat(text,i-1," ") &","&tokenat(text,i+1," ")&")" to output
    -- -- add 2 to i
    -- else
    -- -- add tokenat(text,i-1," ") to output

    Thanks R0J0hound!

    As I understand that with your script it would work with numbers have 1 character.

    But it is a good start for me. :)

  • I was curious why the .pow format? Set text to str((2^2)+(2^2)) displays 8.

    Thanks for your answer!

    I have an input for users can input the numbers and operators to create a math string as a calculator.

    Then users press "=" to show the result.

    I use Math.pow(x,y) because the eval(string) in JS script does not give the correct result if there is a "^".

    But I would try your way to convert the math string and put in the str().

  • Hello,

    I have an example math string like this:

    4^5 + 3^2 + 6 - 2^3

    Then I would like to convert it to:

    Math.pow(4,5) + Math.pow(3,2) + 6 - Math.pow(2,3)

    I tried to break them with "^" and put in array then combine head and tail for each power but everything leads to dead end.

    Appreciate with any idea ^_^

    Tagged:

  • You do not have permission to view this post

  • Set a variable as index of the array.

    Then when you load image, load sprite with arrayIndex&".png"

    Pressing Previous button to subtract and Next button to add to the arrayIndex.

    You must compare the arrayIndex with 0 and 1499 to know the limit when subtract or add.

  • Thank you oosyrag !

    I'm practicing with the Bluetooth example and plugin to figure out what I need.

  • Hello everyone,

    I wonder that if there is any chance to send actions between 2 devices that connected through bluetooth.

    Like I can control a game on other device with another device has virtual gamepad.

    Appreciate for your help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There you go but without plugin:

  • Try this thread:

    construct.net/en/forum/construct-3/how-do-i-8/csv-simiertliar-array-json-vice-129070

    Save your excel to CSV and use the demo in that thread to convert it to array.

  • So you can replace on touch with on collision.

    Then you set a boolean equal true.

    When the boolean is true, start to add up the timer.

    In parallel, you count down X secs after non-interact, count to 0 the boolean back to false and the timer will stop.