El Constructorr's Recent Forum Activity

  • You can retrieve it using AJAX object from an online API.

    Like this:

    https://api.dictionaryapi.dev/api/v2/entries/en/table

    Perfect!! Thank you so much!

    That really helped. AJAX and some string slicing did it perfectly!

    Thanks again!

  • Hi, I'm working on a Word guessing game, and thought having an English (word-meaning) dictionary button would help where it simply fetches the meaning of the current word.

    But I just downloaded the dictionary as csv and it's 14MB in size!.. I really don't want to massively increase the APK file size or load times.

    I was wondering if there's any easy way I can use an Online script/website instead to send the word and return its meaning? (i.e. without having the dictionary in the game).

    Thank you.

  • When you open does it tell you which version did you save it as?

    If yes, then just go to the link: https://editor.construct.net/r<VERSION NUMBER>

    If not, then see in properties what date was it last modified/created. Then browse here:

    https://www.construct.net/en/make-games/releases/page-20 to find which version was last updated before that date. For example, if it is Stable r89, then try:

    https://editor.construct.net/r89

    Then open the c3p file from there.

  • In that case you should ask the owner of that plugin if it contains Firebase Cloud (ability to upload/download files) ?

    You can use the chat option (bottom right) on that website.

  • You can use Sparsha's Firebase plugin to do that (and much more).

    It's not free, but not too expensive either. Has good documentation, and easy to use.

    https://www.constructfirebase.com/

    The basic plan includes: Firebase Cloud Storage Basic Plugin that you need.

  • I know why, and that's my fault, I'm sorry.

    While making that function, I assumed BBCodes need to be written in quotations each time, so I 'skipped' reading them in the function. But I just checked it works anyway as part of the main text.

    Anyway, this is how you can fix my function in the _global layout:

    (remove the highlighted part)

    Once done, use Dop2000's technique of double-quotation to insert a quote within a text. Should work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sure, I'll have a look.

    Can't download that. Please make the sharing link an unrestricted (who has the link can open it).

    Thanks

  • Remove that condition and action where you said if width > 50

    Instead, replace the distance(Self.X, Self.Y, TouchCoordX, TouchCoordY) with:

    Set width to: min(50, distance(Self.X, Self.Y, Touch.CoordX, Touch.CoordY))

    That above will take the minimum value of the two, if the distance is larger, it will choose 50.

    ---

    In the 2nd event (with Has TouchID), also add: Is in Touch

    ---

    If doesn't work, share your c3p

  • Try this:

    Sprite: Set Animation Frame to:

    abs(Sprite.AnimationFrame - int(random(1,Sprite.AnimationFrameCount-1)))

  • I agree. Just drop the dt. Please.

    You should rely on On Trigger impulses, or every tick Forces, without dt.

  • Alright, so since we've made a custom function and your project is expanding, you can expect to fall upon such problems. BUT, they are easy to fix. The solution is really simple.

    But, to make you understand 'why' tags and UID were so important (and in fact, they're required to solve your issue there) let's intentionally bump into more problems (along with the two problems you mentioned), and then fix them one by one as I explain what we're doing. I want you to make the changes as you read this post (at least half way through) so you can follow along.

    Problem 1

    First, to fix the initial problem of moving layouts before the writing finishes, it is because it uses a global variable 'i' to track the position (index) of typeWrite, and it's when you change layout at (let's say) i = 10, then it resumes from 10th character. All you need to do is add this in the _global eventsheet, so every time on the start of every layout it types from the beginning:

    Before continuing, do that above, try it out, make sure that works.

    Problem 2

    Alright, here's a new problem that you're most likely to face later. So let's face it now. I want you to place TWO (or more) Text boxes on Layout 2 for example. Ideally, you would want the first text box to finish writing, and then the next one starts. ALSO, in both, you have written different texts. But from the Function typeWriter there is no way you can tell which text box writes what. Try it out and see how the two textboxes behave.

    This is where "tags" and "UID" are so important. The UID is an ID number unique for every object in C3. So you can 'pick' or refer to it from event-sheets. With the help of UIDs, you can tell which textbox you mean, rather than just saying Type ! Question is: type where?

    So if you click on a text box, you can see it's UID on the left panel:

    The function that I made had a place to include that UID, so that it writes exactly to that, and doesn't get confused.

    Problem 3

    How do I include 'On Finished' in different layouts?

    Unfortunately, "On Function" events can only be used once. Yes they do get activated no where in which layout this is placed. So I highly suggest, place that 'On Finished' event in the _global layout.

    The only way you can correspond to 'On Finished' on for each layout, is by knowing which textBox 'on finished' you're referring to. So you can add sub-events with UID's in one place like this:

    Problem 4

    What are tags then?

    Optional, but very useful. As you can see above, when you have a large project and you need to change what happens after Layout 12 text finishes, it would be become so convenient that (in addition to UID's) you also label each typeWrite with your own "tag", so that you can identify them textually like this:

    And lastly, you can even place the other functions of TypeWriting/SkipBB (that I had made, which are not to be changed) in the _global layout too. Will become more organised.

    You can find a complete page-wise C3P here: https://drive.google.com/file/d/18nAVXIN5XEiyr2yVN4pgZESzt3dGJDPG/view?usp=sharing

    Hope this clears everything.

  • I think when you're removing 'dt' you're also making it to every X seconds.

    Keep it ticks-based. No dt. Always set to V-Synced, Stepping mode always independent.

    (Change the world-gravity only if you're changing time scales at any point)

    To test physics performance, don't change Full-frames/V-Synced, instead, test on two different devices with different refresh rates.

    I'm sure if you'll see the same result then on different refresh rate screens.

El Constructorr's avatar

El Constructorr

Member since 3 Aug, 2019

Twitter
El Constructorr has 2 followers

Trophy Case

  • 5-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies