Rhindon's Forum Posts

  • ramones - Well, your explanation made sense. I'll try to follow along in the capx, itself. Thank you once again, sir! (I think I'm gonna have to give you SEVERAL slots-worth in the post-game credits. LOL)

  • MAIN CAPX: https://www.sugarsync.com/pf/D6025908_4317202_6930991

    TEST CAPX: https://www.sugarsync.com/pf/D6025908_4317202_6933785

    Alrighty! Next issue.

    In the main capx, I adapted everything you helped set me up with. In your rendition, we have 3 layers to work with - 0 through 2. But in my main capx, I have a few other layers, namely the Effects layer, which is nestled between Ground and Floor2

    So with that in mind, I created a new Function, "LayerNames" (see line 13 and line 12 for the Call action), to adapt the placement of the CharFinn object based on the value of CurrentLayer.

    However, this isn't working, and I just don't understand why. I'm still struggling to grasp the parameters element of the functions, as well, which is probably ALSO why it's not working. (In another file, I tried swapping lines 9 and 11, thinking I had them in the wrong spots. Still no dice.)

    I need a recap on the function parameters, too.

    Here's the way I'm understanding them...

    Let's say you're the "Ground" layer... 0.

    So CharFinn collides with the StairsUp object...the Function kicks in:

    Call ChangeLayer(min(NumberOfLayers-1, CurrentLayer+1))

    Number of layers is 3 and the current layer is 0.

    Call ChangeLayer(min(2,1))

    So the minimum value is 1, and thus goes up to "Floor2" (per my additional Function).

    Thanks again for your time.

    (Alternatively, if you're busy, may I petition help from , ArcadEd, Arima, BlueBlaze, or ? Heh, just someone who can spare a moment since ramones has already given me much of his.)

  • ramones - Thank you, sir. :) That does clear things up.

  • ramones - Okay...just to confirm...

    numLayers never changes - it's a constant (at value 3), correct?

    currentLayer is to denote - as the name implies - the CURRENT layer that the Sprite object is on.

    In the FadeTopLayers group, layers refers to any layer above the current layer (per line 9's action).

    Variable finished checks to see when the fading of a layer is complete, but I don't see any time when its value is actually set to "true"... Does that have to do with the fact that it's not constant nor static and that it's repeatedly set to "false" within the While loop?

  • ramones - Okay, I think I'm following you. I'll check back if I need further clarification. Thanks. :)

  • ramones - Thank you again for your help.

    I was wondering if you could help me break down your additions. I'm not yet fully adept at using the Function object.

    Particularly, on line 7, you have the action Set currentLayer to Function.Param(0). But I see that in each instance that you make a Call to the functions, you have a min or max parameter. Why the "0" in line 7?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ramones - DUDE!!! That's beautiful! Thank you so much! :D I'll tweak it to fit my liking and work to understand exactly what you did, but man, I so appreciate your time on this. (I may seem to be getting extra-happy about it, but it means so much to me...I have BIG goals I'm working towards, starting with this game. So you're helping me keep my goals alive. Again, THANK you!)

  • CAPX: https://www.sugarsync.com/pf/D6025908_4317202_6933785

    Pressing the 1 or 2 keys will cause all the layers to scale in or out (imagine this is a top-down view, and each layer is a floor in a building). What I'm trying to do is make it so that each floor above the floor that the black block is on will fade out as so not to obstruct what's going on below it.

    I've tried several different methods, including the For loop, where I subtract 10 from the layer opacity for every iteration of the loop, and I've tried using the Fade behavior, and a couple of other deals. Nothing's quite working.

    Presently, the attempt is the make the layer fade based on a percentage of a target opacity value. As you can see, the blue layer is close to what I have in mind as the scale adjusts. But it's working at the wrong time.

    Both Layer 1 and Layer 2 should be opacity 0 at start. Any layer the black block is on and any layer below it should be visible. Moving down a layer (aka floor) will cause the former layer to fade out and layers farther above will be invisible.

    Any suggestions, please?

  • Arima - *facedesk* Once again, another obvious solution evades me.

  • Ashley - Eh, kinda. I mean, for the layer, yes. But what I was trying to do was get info about the layer based on the object that is on that layer. (Sorry if that's just making the matter more confusing.)

    Ultimately, I'm working on creating a "smooth zoom" feature as the object moves up and down floors/layers (in a top-down view). Hard to explain now, but I wanted the scale of the object (assuming it was 1) to be the target scale value as the other layers scaled in or out. But I'm coming to a better understanding of scale and layers, etc, so all this is probably amounting to nonsense as I try to explain it. LOL

    I'll be posting a help request, though, because I've got the very thing I was aiming for to work in a test capx, but not in my game, even though I copied it 99% identical (the conditions had to change slightly).

    Thanks for your input!

  • Ashley - Ah...good point. I didn't think of that. I was having trouble isolating scale values based on what layer the object was on, so it SEEMED to make sense to have a scale value of the object, itself.

    What about an expression that returns the scale that the object is on at that time? I see you put in expressions for the layer name and number, but not the scale value, itself. Could that work?

  • I noticed that you can Set Scale for objects, but when I want to call upon that scale value - say, when comparing two values - it tells me there's no expression available for it. I'd surely love to see that added. Thanks!

  • *bump* I also accidentally saved over the file with other tests I was trying. I've since restored the file to what I had initially been working with, so you can see what I was trying to figure out.

  • CAPX: https://www.sugarsync.com/pf/D6025908_4317202_6928963

    The game is going to be a top-down view. The levels will be made out of different layers, or floors in a building. Some floors will obviously be hidden due to design. Other floors may consist of catwalks or lofts or large open spaces, which allow the lower floors to be visible.

    What I'm trying to set up is where going up and down stairs, for example, will 1) cause the character to move between floors, and 2) make the floors zoom in and out (by way of Layer Scale). (It's something I'll address later when multiple floors become too close to the screen, obscuring view of lower floors, namely the one the player is on. First I just need to get something set up.

    What I've been attempting is to use Lerp and Unlerp to create a smooth zoom effect, rather than just the sudden adjustment. The player will always appear the same size. Unfortunately, it doesn't seem to be working as I envision it.

    Additionally, in debug mode, I noted that the scale values of the layers never go back to their previous values - granted, with multiplication and division of many numbers, it's gonna be hard to do. I'm also seeing the same problem when I add or subtract values from the scale. This is a problem because as you zoom in and out, the value will never be quite the same. I'm worried that this will lead to inaccurate zoom levels (in beta testing later on).

    It was suggested to me to try using a greater-than/less-than event test to check when a scale value is at its right amount...

    If LayoutScale is < or > x | Set LayoutScale to LayoutScale + y*dt

    It works...it has the effect I want based on the capx shared with me.

    I'm just wondering if there's a solution while using Lerp. Any suggestions? Thank you much!

  • Nevermind. :) I figured it out. I realized the scale numbers I was using is a fraction of the CURRENT scale value.

    sugarsync.com/pf/D6025908_4317202_6928963