AllanR's Forum Posts

  • the easiest way to make sure you get unique results, without repeats, is to put all the possible numbers/strings in an array. Then pick a random entry out of the array, and delete that entry so it can't get picked again.

  • the fact that it was close was more luck than anything...

    the place where you set the slider's position - you were including BrowserSliderMainPart.Height but its height is zero because you replaced it with 9patchSlider.

    the first part of that calculation (scrolly-(1080/2))/LayoutHeight) only works out to 0 to 0.5 because scrolly goes from 540 to 1620. to get it to go from 0 to 1, either multiply that result by 2, or change it to (scrolly-(1080/2))/1080)

    but that assumes the layout height will always be 2160. If you want the scrollable area to be variable, it gets a little trickier. Either you have to change the canvas size as required, or use unbounded scrolling and manually control where scrolly starts and stops.

    the second part of the above calculation needs to factor in the height of 9patchSlider, so the over-all calculation would be something like:

    (((scrolly-(1080/2))/LayoutHeight)*2*((1080-9patchSlider.Height)-179))+179

    or

    (((scrolly-(1080/2))/1080)*((1080-9patchSlider.Height)-179))+179

  • how would it know which one to delete? The last one created? one you clicked on? a random one?

    there are lots of ways to "pick" a single instance, and then it will only destroy the one you picked. But it is up to you to tell it how to pick just one instance.

  • it says it uses 3rd party addons, so those will probably not work with C3.

    Once you get over the initial learning curve, it isn't too difficult. Have you used MySQL or PHP before?

    I got started with some of the old tutorials several years ago and picked it up pretty quickly. There is plenty of experience on the boards here if you get stuck...

  • what I do is put objects in a family, and then use "On family touched" and "Pick Top Instance"

  • here is a quick test I made - it shows an image for 3 seconds, then fades in the next image over 2 seconds. (and cycles through 3 different images)

    https://www.rieperts.com/games/forum/FadeIn.c3p

  • just tried it (keyboard only), and I get stuck crawling, and can never stand up - then I can't jump high enough to get to different levels of the ship.

  • I died 116 times - but made it to the end :)

    Nice job.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • new objects are not pickable until the next top level event. the Wait 0 defers actions until the end of the eventsheet - so new objects can then be picked. You need to move the "Pick Table_ were slot = 1" to be a sub event under were the Wait 0 is. Right now it is out at the previous level, so it is not getting deferred.

    another option would be to add a sub event under the loop that says: if loopindex = 1 : spawn capsule...

    because then the new table_ object will still be active.

  • we would need to see a lot more information to be able to tell...

    the number of objects doesn't seem too bad, and 30% isn't bad as well (depending on what is going on in the game). The lower fps on the notebook is the most concerning part - but what kind of notebook is it?

    It could be behaviours on objects, it could be too many collision checks, it could be unnecessary events, or events structured in an inefficient way... it is impossible to say without seeing more.

  • every time a button is pressed, add it to a queue (array of pending combos), then when the player's current animation is finished, start the next one in the queue.

  • sizcoz

    here is a different approach I worked on yesterday for a while - until I saw how awesome yours was :)

    so, it is only a proof of concept - based loosely on examples ROJOhound made years ago to have objects follow a path. The code is very quick and dirty.

    it is frame-rate dependant, doesn't use bullet behavior, objects can only travel one direction around the path, the path would have to be regenerated after any changes to any blocks... right now it generates the path at the start of layout.

    but you can go as fast as you want! and once the path is generated, there is very little cpu usage - each object just needs to know how much farther it is until the next path node, if it over-shoots it, it backs up to the target node and then heads to the next one.

    https://www.rieperts.com/games/forum/Minions.capx

  • this is something similar I helped someone with years ago, it uses sprites to tell objects what direction gravity is...

    https://www.rieperts.com/games/forum/Wall-Tracing.capx

  • I would set a target for what percentage of the screen to clear, and then each level up increase the percentage required to win

  • a good thing to check is how many objects you have in debug - too many monsters spawning? too many bullets flying off the screen and never getting destroyed? some kind of infinite loop that is creating more or something than you expected?

    when you were getting the error, did it happen quickly, or did you have to play for a while? do you have a huge layout, or huge images?