El Constructorr's Forum Posts

  • Host: Send message (tag: "restart") to all Peers

    Peer: On Receive message "restart": Restart layout

  • If you want the objects to be moving when paused then you can either:

    1. Introduce a fake pause, without changing any time scales. For example: Have a Group "Paused" in the event sheet, when you want to pause, just have those events in it and deactivate the Group so it won't be running. For example: Keyboard/Mouse/Touch inputs will be in there, so people can't interact when the game is paused, but the objects moving will be outside of that group.
    2. OR
    3. If there are not many types of objects in your game, you should look into "Object Time Scale" where you can have different objects behave differently with time. But this can get tricky and confusing sometimes. I'd recommend the first option.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The first problem: When 'Pink' overlaps with 'Pink' it destroys 'Pink'. So it destroys both of them.

    You need to specify in the condition by saying: Pink: Pick Top Instance, then it will destroy the recently created one.

    Yes you can instead just randomly relocate it, instead of destroying.

    I assume you'd want them to be created on a grid-like pattern, instead of randomly scattered? You can make use of the modulo operator % to achieve that. for example:

    PinkSquare Set position: random(192,896) % 64, random(192,896) % 64

    ----

    Second question: So you're trying to make only Tetris-type shapes? In that case, you would 'Pick' a pink square (let's say: Top instance), then 'Spawn' pink. (This will create another Pink on top of it), then just move it Either x by 64 (or -64) or y by 64 (or -64). You can use the choose expression for that. If the squares are symmetrical and square, then this might work nicely:

    PinkSquare Rotate clock-wise: choose(90,-90)

    PinkSquare Move forward: choose(64,-64)

    But make sure to remove the 'destroy' on overlapping, that can cause more problems later, especially when you'll want to actually check for overlapping two different tetris blocks, etc. They'll just destroy.

  • Thanks Gloomie

    Yes, I used a plugin by Sparsha: https://sparsha-dhar.itch.io/construct-3-firebase-plugin

    There are two plugins ($12), one manages user accounts, and second handles Real-time Database, both through Firebase.

    It's really simple to set-up, he's got well documented guide and also has a Discord channel for chat (help). Once you've created a Firebase account, and added your project there. The C3 side is as simple as using any other C3 built-in plugin. Straight-forward condtions/actions, e.g. Sign up, Sign in, Read-Data, Write-Data, Read Leaderboard, Incremeent Score value.. etc.

    Real-time database in Firebase is made extremely simple to use, and looks like this:

    So without any extra web/programming know-how, you can easily work with user-accounts and store/fetch user data, both: on C3 side and Firebase console.

  • No Cricket Fans around? :(

    Update: I've added Offline Practice Modes! Must check it out.

  • It's easy. You can set the "Room name" as the Code.

    So in my game (two players), the Host creates a game, and joins a 4-digit (random number) Room.

    It displays the Host that 4-digit code, and Share button.

    They can tell/share the Code to their friend, and they can "Join", enter the code, and that will be the same Room name so they connect together.

  • In the sprite's actions, look for these:

    Tween one property

    Tween two properties

    You'll find everything there.

  • Add 'Tween' behavior to that object.

    Use two Tween actions:

    Tween: Opacity, End value: 0, time: 1 sec, loop ON

    Tween: Scale, End Value: 1.4, time: 1 sec, loop ON

  • Wild Guess: You're not using Trigger.

    It should be "On Key Pressed: " not "is Key is down"

    is Key down would delete characters every tick!

  • Didn't understand when you said "Disappears when moved"

    Moved? what moved, the object? the viewport using Scroll-to behavior?

    Anyway, you can do one of these things if you want something to always remain in the same place on the Viewport (dotted rectangle):

    1. Keep the things on a separate Layer that has 0% Scaling, and 0% Parallax X and Y.
    2. OR,
    3. Use 'Anchor' behavior to that object. Particularly useful when you're having fixed objects on the sides or corners of the screen.
  • You're not updating 'level_atual' variable, it's always 1.

    Besides, you don't need that variable.

    Just use these conditions instead:

    levelselect.level <= LocalStorage.itemValue then Set Animation frame to 1

    Else: --> Set Animation frame to 0

  • My wild guess is that you have 'two' objects with Scroll-to behavior.

    There really should be 'one' (your main character). If there are two, then it tries to get a ratio in the middle to scroll-to.

    I'd suggest quickly check all objects' behavior. I can't think of any other reason.

  • What I use is a small invisible sprite (10x10) called 'scroller'.

    Add Scroll-to and Tween behaviors to it.

    Then, whenever you need to scroll, use Tween to that sprite with Ease (e.g. In Out Quadratic).

  • Add a Tween behaviour to sword

    On Any Touch

    Sword: Tween one property:

    Property: Angle

    End Value: angle(sword.X, sword.Y, Touch.X, touch.Y)

    Time: 0.5 seconds

    Ease: Out Cubic

    Ping-pong = Yes

  • It's limited by the Layout Size, which prevents the viewport to go outside, or show anything beyond.

    To fix that, click anywhere outside Layout area, on the left, select "Unbounded Scrolling'.

    This will let the camera show outside the layout as well, it will probably be Black, depending on what background color you've set in Project Properties.