AllanR's Recent Forum Activity

  • whitkin

    Construct almost always runs sequentially. The only time anything runs in parallel is when something is farmed out to a worker (like path finding).

    so the answers to your questions are: false, false, false, true, true.

    calling a function is no different than copying and pasting the actions from the function and putting them where the function was called from. (Except that in the function, it doesn't have any objects picked).

    calling a function from a function is no different - actions still run sequentially. Recursively calling the same function works the same way too...

    Events with a trigger can be executed out of order, otherwise an Eventsheet executes sequentially top to bottom - following function calls as necessary.

    One very common area people have trouble with is knowing when things take some time to finish - like creating an object, a new object can only be picked after the next top level event from where it was created (except that it can be picked by its UID before that). "Wait" also gets people in trouble all the time...

    There are lots of other things that take time to finish - AJAX calls, Local Storage reads and writes, Browser resizing, etc.

  • I haven't moved to C3 yet (but probably will soon)...

    I use disable ALL THE TIME too when debugging. It is pretty much the only time I use that menu - every thing else on there I use keyboard shortcuts.

  • - here is a quick sample... I am not sure how I would approach it without arrays - Dictionary is a good idea too, very similar to an array, but maybe a little less confusing. You have to store the stories in something, and if you want lots of them it could get messy...

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

  • - here is a quick sample... I am not sure how I would approach it without arrays. You have to store the stories in something, and if you want lots of them it could get messy...

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

  • positronic

    you were close! PickedCount is one of my favorite things in C2 :)

    I also added an Activated animation to the chestCheck sprites just to make it easier to see what was happening...

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

  • is your plan to store the stories on a server so different devices can access them, or store them in local storage (so only the device that created a story can see it?

    and how long are the stories? are they going to be copy and pasted from other sources? If you want any text formatting it get a lot more complicated...

    Plinkie was suggesting using an Array to store the stories in. Which is a good idea, and makes saving to local storage easier. But the code is tricky to follow for people who have never used arrays before...

  • Freddy33

    If you already have a web site and can upload files to it, then it is very easy!

    just export your game as HTML5, make a folder on your web site under public_html, and upload your game into that folder. On your main web page, put a link to your game's index.html file in the folder...

    EDIT: if you want your game on the front page, then use an iFrame that points to the index.html file in the folder... (but only if your game is very small and loads quick).

  • WesleyDeveloper9

    That is not an ideal way to do structure your events.

    What will happen is that once the txtPlayerPoints is "16", all the actions will be executed every single tick while that condition is true (60 times a second). So, it will continuously try to stop playing tag 2, restart "Forever Believe" (all you will hear is a buzz), try to destroy the objects, and enable the button... while it is waiting for the player to click it.

    you should structure it so that the actions only execute once. One way to do that is to set a global variable "LevelOver" to 1.

    and move the button click code to the top level. You don't really have to have to check LevelOver on the button click because the button is disabled and invisible before points gets to 16, but it doesn't hurt.

  • Goodbubble

    welcome to the forums :)

    Making a good menu is harder than people think. There are lots of tutorials... although some are better than others, and I have seen some that don't help at all.

    plus there are many examples in the "How Do I" forums... here is one from a couple months ago:

    https://www.construct.net/en/forum/construct-3/how-do-i-8/save-stars-level-selection-142945?kws=levelstars

    I posted a sample that shows how to save unlocked levels and how many stars the player has achieved.

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

  • idlephononautica

    without a plugin, Lerp might be the best option - but like you found out, it can be tricky to get what you want. You could also try bullet behavior - that allows acceleration/deacceleration.

    otherwise, litetween is how I would do it.

    https://www.construct.net/en/forum/extending-construct-2/addons-29/behavior-litetween-48240?kws=litetween

    if you ever move up to C3, it has a native tween feature...

  • allowiscous

    I love arrays, and I use them all the time. When I need to sort complex data I use a second array to create an index back to the first array.

    But in your case, I am not sure an array is the best way to do this. You already identify the baddies you are interested in with the in_range instance variable, so they are very easy to select. Keeping the IDs in an array doesn't add much benefit when you can just pick them.

    I would add another instance variable to baddies called Distance, and then in the update position section calculate the distance and store it in the instance variable. This will simplify your code, which makes it much easier to read months later when you are trying to remember what you were trying to do...

    after the distance has been updated, you can pick the baddies in_range, and order them by Distance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • JUXU

    it will only restart the music if your eventsheet tells it to start the music at the start of the layout.

    you can use tags to check if a specific song is playing, or you can check if any music playing, and only start the music if nothing is playing.

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies