El Constructorr's Forum Posts

  • 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.

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • I'm not an expert here, but I had spent days trying to figure out what caused my Physics to change when I tried it in 'fast forward' (higher time scale).

    I still don't know why it does it (probably a bug), but I found out that it has something to do with 'World Gravity'. It doesn't reflect correctly when it comes to 'time scales' and/or 'dt'.

    My suggestions are:

    1. Try without the use of 'dt',
    2. and/or
    3. Change the World Gravity if at any point you're changing the Time Scale.

    For example, if your World Gravity is set originally to 30, and if you make your time-scale to 2, then everything is messed up until you make the World Gravity to 15. Then it's back to normal physics. (so inversely proportional).

    To change the 'World Gravity', you can use any physics object's action, it applies to all I believe.

    And always use V-Synced and Framerate Independent (so that different refresh rates devices don't affect Physics).

  • All you need to do is increase the X randomizer to a large value (the size of your viewport). And have the particle object in the bottom-center.

    You'll find it in Particles properties:

  • Thanks, I'm glad it worked!

    As for 'On TypeWriter Finished', the simplest solution would be to raise a signal (I prefer using another function) when the loop reaches the end of 'length'. This is where you would add that function:

    So it would work the same way as the original plugin. EXCEPT, if you later add more Type Write texts, you'll need a way to specify which textbox finished. Currently, the function is specifically for one Text box. But if you want to use multiple text boxes, I've modified the function, which lets you add 'tag' so you can refer to which 'On typeWriter Finished', and also TextUID to refer to which textBox you want to write to.

    Here: https://drive.google.com/file/d/1XlAVb_h002XTk3I7ir5l_MnUvT_sjMwU/view?usp=sharing

    Sorry, I am currently not looking for consultancy, as I see myself getting busier and more occupied soon with my own pending projects. Thank you for asking though! I'll be around on and off, you can use this forum to get help from myself and many others, who ever is available.

    Hope this helps.

  • Oh yeah, it simply inputs every character at a time so it only recognizes the bb code until it's finish reading the square bracket close.

    I've added another function that appends everything after "[" until it reaches "]" together.

    Here: https://drive.google.com/file/d/1Vld_KKaslJQrRHWb-R89m0lFf27w3Iif/view?usp=sharing

  • It's definitely because the built-in Type Writer plugin uses the worldclock time measurement system and division (as oppose to wait for seconds). Changing time scale will hence still make it finish in real-time.

    But you can make your own Type Writer 'function'. And same way, pass on the Text and Duration, with 'wait for some seconds' in between it will do the same.

    I made a quick one here just now: https://drive.google.com/file/d/1X_5eRV-9f7zwMD_JQ4aIIuozICPi-E-R/view?usp=sharing

    Note: It uses recursion, which is slow by itself, so it wastes some extra time. Meaning, the 'duration' you enter won't be exact. It may take a few extra seconds to complete. But it stops with time scale 0, so it does the job!

  • Alright so I made a slight mistake in % x,y grid arrangement. What needs to be done is first create it randomly, then adjust it so it's on a grid using: Set Position: Self.X - (Self.X % 128) etc.

    I included a Function called: "checkOverlap", this can be called whenever there is a chance for overlaps, for example: (1) after it has moved to get aligned to grid, or (2) rotate and moved.

    The rotate and moved was only to make it either go LEFT or RIGHT if it's overlap. I was thinking you're trying to make a Tetris like shape (like L or T shape as well). If it's only going to be straight horizontal / vertical lines, then you don't need this. You can remove the 'rotate and move' lines.

    Here are the two items implemented: https://drive.google.com/file/d/1uDhLlU-DI9VUgdJYwYAaROXYTiH9m1Pw/view?usp=sharing

    But I highly recommend re-thinking the strategy on making a pile of blocks, otherwise, wouldn't the blocks just randomly appear adjacent to another pile of blocks? I don't quite understand (even from that pdf) how the game would work really.