korbaach's Forum Posts

  • clamp(x, lower, upper)

    Return lower if x is less than lower, upper if x is greater than upper, else return x.

    Player(varHealth=92) on collision with Bonus(+25) ..set varHealth to.. clamp(varHealth+25, 0, 100)

    varHealth100.capx

  • did you export&upload your game on server?

    Capx would help troubleshoot. Image path correct? In quotes? Same domain?

    works for me in r227..

  • "der"≠" der"

    set ChosenArticle to trim(tokenat(WordsArray.At(randomNumber),1,";"))

  • Set collision polygon

    Set the collision shape for the image or frame. By default Construct 2 guesses a collision shape, but it is not always accurate. Click and drag the points of the collision polygon to alter its shape. Right-click to display a menu of additional options for the collision polygon, such as adding and deleting points.

  • If I correctly understood..you don't need a loop...

    LoadArray = ["0", "1", "2","3",0","4"];

    On "setupLayout".....set gamePiece animation frame to int(LoadArray.At(gamePiece.IID))

  • I followed the code exactly. My Names erase every time i get to the high score board are replaced...

    almost

    On start of "Score" Layout you save Array to "hiScore" LocalStorage...

    On pressed "Space" you save Array to "hiscore" LocalStorage...

    "hiScore"?"hiscore"

    also you need loop..Array for each X element...to set curX(on "Start" Layout)

    version 0.41.capx

  • you can use rex_date plugin to get Day&Month

    (or you can use Browser object and ExecJs..)

    so...if you have folder1,folder2...folder5...etc

    and pic1.png,pic2.png..pic12.png..etc

    you need to set url to something like this

    "http://example.com/folder"&Date.Month&"/pic"&Date.Date&".png"[/code:2idijphs] [i]probably...[/i]
    [b]Edit:[/b]
    If you use for folder or picture 01,02,..09 format ...you need to use  [i]zeropad(number,2)[/i]
    [img="http://lookpic.com/O/i2/1701/4Wnc5YIj.png"]
    [i]I use XAMPP server in example so url start with "http://localhost/"[/i]
    so..URL
    [code:2idijphs]"http://localhost/folder04/pic12.png"[/code:2idijphs]
    becomes
    [code:2idijphs]"http://localhost/folder"&varMonth&"/pic"&varDay&".png"[/code:2idijphs]
    
    maybe would be best if you share link of today dummy pic..for testing...
  • If two scores on the high score board are the same it edits them both..

    fixed.capx

    And also For whatever reason even though (As far as I can tell) I followed the code exactly. My Names erase every time i get to the high score board are replaced with 0's

    I can not help you without capx...just delete all unnecessary parts of code,replace sprites.. or incorporate

    your code in my capx...

  • example3.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • adventurist but why regex?

    maybe you can use tokenat instead... collectedFishLoop.capx

  • If I correctly understood.. you want something like this..

    Here's how I did it collectedFish.capx

    but I have trouble to understand where you write Uid..how you retrive data...so upload a simple capx...

  • you can try:

    Files----> Import files

    but..Yes..I think most people use custom sprites for UI...

  • Local storage

    Local Storage is asynchronous. This means reading and writing data does not complete immediately. The actions only start the process of reading or writing a value, and the game continues to run in the interim. This ensures that slow or busy storage systems do not impact the performance of the game. When the read or write is complete, a trigger fires (On item get or On item set) which indicates either the value is available to read (with the ItemValue expression) or that the value was successfully written.

    For example here is a flow to read the value of the key "score":

    1.Use the action Get item "score"

    2.A moment later, On item "score" get triggers

    3.In this trigger, use the ItemValue expression to read the item

  • I know it's an old one, but it still small,fun and free... Electronic Piano

    Audacity -

    Subscribe to Construct videos now