mardoch's Recent Forum Activity

  • For now this is my code:

    + System: Trigger once

    + System: Pick BG1 where BG1.BBoxBottom ≥ LayerParallaxY("LayerBG")-640

    -> System: Create object BG1 on layer "LayerBG" at (360, BG1.Y-1280), create hierarchy: False

    It works for the first background but it stop at the second one…

  • Hello everyone,

    I'm trying to make a simple doodle jump like game and I have a problem about my background.

    I have several different images for it and I want to create a new object with a random image each time my view reach the top of the actual background. So it will scroll to a non identique background each time.

    I join my c3p file here so maybe someone know who to do this…https://drive.google.com/file/d/1nIWwMrhVr7YyDEltI03Nnr_r__By9rqR/view?usp=sharing

    Thanks!

  • Ok I see, it can be useful, thanks.

    But still I don't know to pin the last bone (SnakeBones.IID.5) to the base. That's my main problem actually.

  • Yes in fact I usually do it with sprites animation but I choose this way to make it unpredictable and make its movements randomized. The head is the only hit point.

    I'm curious about your container idea, how do you link the head and base?

  • Hello there!

    I'm actually working on an enemy who's kind like the ones in Castlevania SotN:

    https://www.spriters-resource.com/resources/sheet_icons/53/55902.png

    My main problem is to link my enemy to the base object on the ground. Actually all the body parts are pined to each other to make a snake body effect.

    Also the movements are created with the head but it's not very smooth…

    So can check the c3p file I have done for now:

    dropbox.com/s/vakmvlaolh4caol/EnemyTest.c3p

    If anyone has a solution it will be great!

    (Sorry for the enemy design, it's a placeholder actually but I will make a nice one soon)

  • Hello there!

    Maybe some one already did that but can't find an answer on the forum.

    I'm trying to post an image URL on twitter, I suppose it's possible to make it with img to URL but it doesn't work yet.

    Any idea?

  • I get the final answer.

    First change the php code:

    $count = 9; $page = 0; if(isset($_GET['page'])) { $page = $count * intval($_GET['page']); // $page = $count * intval(strip_tags(mysqli_real_escape_string($con, $_GET['page']))); }

    Then get the Ajax request like:

    DOMAIN_SCORES & "getscores.php?page="& CurrentPage

    Of course the CurrentPage should be a variable.

    Now you can load a lot of data without preload everything from your table!

  • I can load all my data but as I only put 29 Text object (3X3 for rank, user and score)

    This is what I got:

    I know that the rest of my data is already loaded with but how am I supposed to display it on the same Text object? like switching to the next 29 elements?

    Any idea someone?

  • Yes, I did put it on 50 just to test it. I have around 40 elements for now.

    But I realize that I was wrong about using array. My first idea was to load the entire datas from mysql in the array and then manage to show them part by part (on load display the firs 29 elements then show the next 29 ones and so on)

    But that's a problem if I load like 1000 elements. It will take hours to get all the elements into my array.

    So the idea is to prepare pages on the requested php. So I make this:

    $count = 9; $page = 0; if(isset($_GET['page'])) { $page = $count * intval(strip_tags(mysqli_real_escape_string($con, $_GET['page']))); }

    With this code I can load the first 9 row from mysql table as page 0.

    Now the idea is to use Ajax to change $page in the php so it can load the 9 next entries.

    And this is where I don't know how to do it.

    If I create a new request, it should looks like

    Ajax: send $page=+1 to URL MY_DOMAIN & "getdatas.php?page="page"

    Probably a confusion here…

  • Whoa, savvito123 your are fantastic my friend! Can't wait to test this! I did some progress on my version but I really can complete it now! Gonna post the result asap!

    Thank you so much!!

  • So this is my actual Event Sheet.

    I can load data, I even can move to the next 9 ones but I can't go back on the previous one.

    I'm really going mad on this… a solution anyone?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi there, I guess there is something I misunderstand with array.

    I can load datas with Ajax so that's great. It display now the first 10 entries but I don't know how to display the next 10 ones. I just want to navigate throw all entries.

    Do I have to reload the array each time?

    Tagged:

mardoch's avatar

mardoch

Member since 21 Nov, 2013

None one is following mardoch yet!

Trophy Case

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

Progress

16/44
How to earn trophies