brushfe's Forum Posts

  • I believe UIDs change at runtime depending on the amount and order of objects. So instead of writing UID 521, which could be anything, write Sprite.UID (replace sprite with the name of the object you're trying to pin it to)

  • Does it help if you change those bottom four events to these?

    Player Platform speed = 0

    -----> Set animation to "Default"

    -----> Set run to 0

    Else

    -----> Set animation to "a1"

    -----> Set run to 1

    EDIT: You might need add an inverted Player Is playing "a1" to the Else statement, so that it only changes the animation to a1 if it's not playing already. This will stop it from starting over infinitely.

  • Do you have an event that's setting it back to "idle" running every tick?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh I see what you mean-just the event-based bit.

    A simple version could start with picking a random number, and calling a function with number as the parameter. The function contains all the different code for all the different events.

    So you'd create a Function called RandomEvent, with the parameter EventNumber. Inside that function is a series of If/Else conditions.

    If EventNumber = 1

    ---> Run the actions for Event #1

    Else

    If EventNumber = 2

    ---> Run the actions for Event #2

    And so on. Is that what you're looking to do?

  • Like any game, this type of game is just a combination of objects, actions, and reactions. So if you break down your game into those components, you'll find it a lot easier to build, find tutorials, etc.

    Monopoly, for example:

    Objects: game board, game pieces, dice, cards, money.

    Actions: dice rolls, buying/selling property, paying money to other players or the bank.

    Reactions: roll results, player movement, landing on a game board square, earning/trading/losing property, adding/removing motels and hotels, drawing/viewing cards, earning/spending money, etc.

    Once it's broken up like this, it's a lot easier to imagine how to design each component individually than a whole game (e.g. If people are gaining/trading/losing property, we need an array to keep track of who owns what, and we need a function to modify that array).

  • Hey! Is the problem that the character is sitting too low on the platform?

    If so, check the collision box on your sprite, and make sure it's aligned with the bottom of your sprite.

    Double-click on the sprite object, and press the collision box tool (red arrow in the image below). Then drag the box handles so that your collision area at your character's feet (blue arrow).

    Hope that helps!

  • It would be much easier to help if you could share your code (the screencast video player is really slow!)

    But in the meantime, I'd suggest using Families for this kinda thing. It's a lot easier to use one block of code that governs multiple objects.

    I've put a quick example together here, see if it's helpful!

    drive.google.com/file/d/1i8sKF7b0PxsrmsBy3Whi1I_3bHFSsCUq/view

  • winkr7 has a lot of great points!

    Getting comfortable with arrays opens a lot of doors. It'll be really useful for a large scale project, but really any project benefits from keeping your variables centralized and easy to balance. The new template feature and the built-in array editor make it super easy to implement.

    And save a new copy your project with each Construct release, especially if you use betas.

    I use timer behaviors constantly. I find them really useful in later development, when the pacing of things matters (menus appearing, rewards being given, moving to the next level). It's a lot easier to fine tune the experience when actions are tied to timers.

    Don't forget to check if you need a "for each" condition when picking.

  • If you're comfortable sharing your project, it would help someone here find out what's wrong. It's usually impossible to do with a video showing only parts of your code.

    If not, you'll have to keep digging into why collisions work in one layout but not another.

  • Understood, thanks!

  • I thought I'd check before assuming it was a bug report—

    In the Animation Editor, when the Rotate Image buttons are pressed, the image points rotate with the image.

    But when the Flip horizontal/vertical buttons are pressed, the image points stay where they are.

  • Haha that 'feeling dumb' is the best! I'm a card-carrying member of that club... I tell myself it means we're learning :)

    The playground experiments are a good habit! It's a good way to get a handle on a behaviour, and really helpful if you do in fact catch a bug and need to report it.

    I'm looking forward to your project - keep at it!

  • Hey there!

    So are you saying that in your project, re-enabling the object's Platform behaviour also restores its previous vector x/y?

    With these kinda things, it can be helpful to make a project from scratch, with just the minimum objects you need to isolate your problem. A single sprite with Platform behaviour, a key to enable/disable that behaviour, and a text object displaying its Platform vector x/y should show you the answer.

    Or, if you're asking if that's a bug, the same minimal project will help folks here assess that.

    In either case, these quick focused tests are great exercises to find out whether its the behaviour's intention or something else in your code that's causing the output.

    Hope that helps!

  • Amazing, thank you! I really appreciate it—I'll try it out tonight! Thanks!

  • A few years back, R0J0hound, you saved the day with some code that launched a 2D baseball into 3D space.

    Would you (or anyone else) know if it's possible to use this code to drop a ball onto its shadow from above?

    Specifically, I'm reusing this code for characters in a Beat 'em Up. It works great for jumping and knockback, but when they respawn, I'd like to start the sprite 100px above the shadow, and have them drop straight down to the floor.

    Is it possible to change the variables in this formula? Or is it something different entirely (i.e. should I just use MoveTo)

    Thank you again and as always!