Rhindon's Forum Posts

  • AlexmosuTSP - UIDs only change in the editor. So if you hard-code an event that says "pick object with UID 5", and do some stuff in the editor, that event might later refer to a different object.

    UIDs however are always unique to an object at runtime. So if you retrieve an object's UID and store it in an instance variable, for example, it will always refer to that object.

    Can you give me an example of this, please?

    My situation is where I'm using instances of a small block sprite to represent a health meter. Every time my character is damaged, an instance of the sprite will be destroyed. How do I initially call for the sprite's UID and store it to an instance variable? Am I to assume you mean an instance variable OF the sprite object, itself?

  • I've seen some similar posts to my dilemma, but nothing quite seems to answer my problem.

    I've set up a simple side-scrolling platform scene and created a small incline sprite with the Solid behavior. I made sure the collision polygon is in place, will full crop of the singular frame.

    My character with the Platform behavior moves and jumps as it should on level ground. The odd thing is that, while my character will jump and move just fine while going up the incline, going down is another matter. It will still move correctly while walking, but as I'm going down the incline, any attempts to jump act like it's locked to the platform.

    A summary...

    Horizontal movement up: Good

    Horizontal movement down: Good

    Stationary jump: Good

    Horizontal movement up + jump: Good

    Horizontal movement down + jump: FAIL

    I tried to see if somehow creating a "reset" would solve the problem via an "overlap" condition by positioning the character up higher based on its previous elevation (stored to an "old_Y" variable). However, this actually made the problem worse (per my attempt). I find that I don't know how to test if it's actually an overlap preventing the jump or if there's that tiny split second when the character is "falling" from one pixel of the incline down to the next below. Or something else entirely.

    Origin points are in place (bottom-center for the character and dead-center for the platform)...if that makes any difference, I don't know.

    For the movement controls, I'm using Simulat Platform pressing Jump and the Action Set X to Character.X+CharacterSpeed*dt for the horizontal movement. I'm inclined to think the decimal value of dt is the cause of the problem...but, why on the decline but not the incline?

    UPDATE: I changed the horizontal movement to Simulate platform pressing Left/Right and that seems to have solved the problem.

    However, from my learning so far, setting movement based on dt can help even during slow PFS rates. Will using the Simulate platform Actions make any difference?

  • How do you set an instance variable to <varies>. I sorta get how it comes to that, but what circumstances result in <varies> being displayed in the properties bar? Like, if I edited the initial value, how do I get it back to <varies>?

  • I checked other related posts and Tom was stating that the feature was still in beta. That was early last year. I just saw the same thing happen to my rep so it seems it's a slow-progress deal. As long as they keep up with C2, though! Then we're good. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I had the same deal recently - I saw the recalculate button and clicked it. I was sad. LOL I lost over 100 points! Small potatoes but it feels good to see some kind of progress in just LEARNING and participating.

    I'm also at a loss for finding the princess and treasure... I'll probably stumble on it randomly.

  • R0J0hound - I believe I've come across the same problem...but it's while going down slanted platforms where I've adjusted the collision polygon. I thought perhaps it was that BRIEF tick of time where the character box is dropping from one pixel height down to another, but even increasing gravity to lessen the theoretical time in the air falling, pressing the jump key seemed to lock him to the platform...much like AngeloFernandes noticed, it wasn't until the end of the platform did the character jump.

    If I'm reading your Event sheet right, you're telling C2 to position the Y of the player at its last position before there was an overlap with the platform's collision polygon...correct?

    Can you also explain to me the dummy --> pair=platforma.pair Event condition? I don't get what's going on there.

    Thank you!

  • This is a GREAT idea. For even the most knowledgeable people on C2 don't always TEXTUALLY explain things. It helps many of us to SEE exactly how it's done.

  • Nimtrix - AH! Thank you, sir! (Total side note: I LOVE your avatar image. That just rocks.)

    I wondered if it wasn't that simple. I'll test that out a.s.a.p. Thank you again.

  • I'd like to know if this can be done, too. Good stuff to learn. *open eyes to better hear the replies*

  • Digging around in the included examples with C2, I came across the lighting.capx file that (apparently) was created by ASHLEY. (LOVING the effect, too! I'm gonna use it somehow.)

    The effects and settings for the image sprite seem straight forward enough. But when I examine the animations part, I'm not quite sure if that's truly an imported image or what... Ultimately, what I'm seeking is how to initially START the object. Is it just a dot that's manipulated further? An imported image? What?

  • Kyatric - I think I got it. Thanks. I tested it and everything seems to be working.

  • Kyatric - (Hello! Iiiit's me again.) I actually just found that very .capx and wanted to learn how to recreate it so I could learn further how to manipulate it. The problem I'm having is knowing where to start. I see that both light objects are sprites...so I took a peek at the "edit animations" feature. Is that an imported image or is it more of a quick-drawn image made via C2's drawing tools?

    I tried to insert a new object, and maybe I'm not searching deep enough, but I don't see (initially) how to implement such a lighting effect.

  • Kyatric - AH! Okay, so if I want to isolate the GroupVar to its group, I just need to set the variable to static so it doesn't get reset every time?

  • justifun - *chuckles* Thank you, too, for your input. I guess I need to clarify what I'm after. The technical/programming parts I've got down just fine. It's working on that end. What I wanted to ask about was if - according to my description - that sounded like an interesting graphical presentation. Where the "pixels" of my stickman are constantly hiding and reappearing from behind a grid immediately in front of it. Like, imagine a piece of graph paper and the lines are solid, but the spaces are transparent. Then imagine watching all the action take place behind it. The characters are made of of squares of the exact same size as the spaces of the graph paper. And portions of the squares (pixels) seem to "hide" behind the graph paper grid lines OR reappearing on the opposite side of the of the grid line. Almost to the point that the individual pixels look like they're resizing as they go behind the grid lines. All of this while the normal action takes place.

  • Kyatric - So I checked out the example you posted (many moons ago).

    I have a group set up to control the horizontal movement of my character. I then create a local variable (we'll call it GroupVar). GroupVar is set up to control the speed of the character --> Set X to PlayerBox.X+GroupVar*dt (PlayerBox being the invisible platform object).

    All the Events following GroupVar's declaration inside that group remain on the same level as GroupVar.

    At the push of a button, I add or subject a value from GroupVar, ultimately adjusting the speed of the character as it moves.

    That's the idea, anyway. This works when I set GroupVar as a global variable. But (using an on-screen text test) I noticed that when I declare GroupVar locally at an initial value of 120, no matter how many times I push the proper button, it remains at 120. Again, as a global variable, it worked perfectly, and I saw the text display the proper value and the character moved accordingly (even to the point of moonwalking at negative values! lol)

    What I don't quite understand (though I believe I have an inkling as to the reason) is why a global variable seems to not be reset every tick while a local variable is. IS THIS because every tick the local variable is essentially re-declared within the group/event it's associated with, whereas the global variable remains open to any and all events/actions that may call on it?

    As always, thank you!