mekonbekon's Recent Forum Activity

  • After spawning, in the same spawn event set angle to random(360).

    If you want to add even more variety set the scale to random (1,2)*0.5

  • OK I'll give it whirl and report back.

  • FabianB One way would be to assign an instance variable to the sprite and then give each instance of the sprite a unique value for that variable.

    Then, on right mouse button click, if sprite.instanceNo = 1, move sprite.

  • khelaghor No worries, glad to be able to help

  • I want to limit the input of the user from (1-4). Could you please tell me how can I do that?

    You could use the Textbox:set text action before assigning to a variable e.g.:

    If int(textbox.Text)>4 set Textbox text to 4; set variable to int(textbox.Text)

    If int(textbox.Text)<0 set Textbox text to 0; set variable to int(textbox.Text)

    Problem is I have 10 textboxes same object. Shall I make 10 different textboxes or can I do with same textbox?

    If you are assigning the values to an array, add an instance variable to the textbox object, give each textbox a unique value from 0-9 and then use that to assign the value to the array e.g.:

    Set array value at (textbox.instanceNo, 0) to int(textbox.Text)

  • You can use NOT overlapping at offset to achieve this:

    https://www.dropbox.com/s/5qqsnpty5stey ... .capx?dl=0

  • Hi sizcoz,

    This looks really good and just what I was after! Thanks!

    One question, will this work in a Cordova export for mobile, or is it only suitable for HTML5 exports?

  • You can use the following expressions to convert strings to numbers (from the manual):

    float(x)

    Convert the integer or text x to a float (fractional number). If x is text, non-numeric characters are allowed after the number, but not before. For example float("3.1xx") returns 3.1, but float("xx3.1") returns 0.

    int(x)

    Convert the float or text x to an integer (whole number). If x is text, non-numeric characters are allowed after the number, but not before. For example int("33xx") returns 33, but int("xx33") returns 0.

    So if you want to assign the contents of a textbox object to a variable as a number, use the following action:

    Set variable to float(Textbox.Text)

    ...or...

    Set variable to int(Textbox.Text)

    ...depending upon how you want to store the number.

    You can then assign that variable to an array index.

    Alternatively you can skip the variable assignment and go straight to the array:

    Set Array.at(X,Y) to float(Textbox.Text)

  • bump

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • if the button is definitely registering the click then try adding a loader layout and make sure all sounds are preloaded, rather than starting on the Home screen.

  • pcprice76 No worries, glad to be able to help out

  • It's hard to tell without seeing the capx. Maybe the page is still loading in the background? Perhaps switch to a different frame on the button when it's been clicked, at least that way you can tell whether it's because the button isn't registering or because there's a delay before loading the next layout after the click has been registered.

mekonbekon's avatar

mekonbekon

Early Adopter

Member since 9 May, 2014

Twitter
mekonbekon has 13 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies