lunaticedit's Forum Posts

  • So although there's an "anchor" behavior, I find it to be pretty bad and jittery. What I do is create a "GUI" layout, rename the layer to "GUI", mark it as global, and set the "Parallax" under "Screen & zoom" for the layer to 0% x 0%. Note that this layer will override any other layout's layer named "GUI".

    Now all you have to do is add a layer called "GUI" to your other layouts and boom, fixed position GUI!

    Of course you could call it like "HUD" or "Controls", and just add that layer to any layout you want the HUD/Controls to be visible in. The import thing is that you add a layer with the same name to any layout you want the controls visible in as C3 will replace it with the global layer.

    And in case you are wondering, Parallax is supposed to allow the layer to scroll at a different rate than the rest of the layout. By setting it to 0% x 0%, you're forcing it to never scroll (giving you a stable fixed position on the screen at all times).

  • I have some objects that I instance. An example would be a Tileset, a Sprite (specifically a Trigger), and NPCs.

    Now the tileset of course can be drawn on, sprites have instance properties that can be set, etc. I, by convention, drag at least the first instance into a "Master" sheet so there's always that first core instance. I can also drag multiple instances, and set each of them to have different instance variables. All of this works as expected.

    But sometimes I get 'old' values when dragging new instances. For example, if I drag a new instance of Tileset into a layout, it will have one of the other layer's layouts by default, which I have to erase before I can draw new stuff on it. Similarly, I may drag a new trigger instance into a layout, and for whatever reason, its attributes default to a previous instance's attributes (even though I have one on the Master sheet).

    SOMETIMES when I drag a tileset to a layout, it's blank as expected.

    I'm really confused here. How does it decide what the 'default' state is?

    Tagged:

  • Ok I got it working, thanks for the hint!

    For anyone else having this issue.. it appears that you can 'filter' child references by adding them to the condition list for the code block. Everything works perfectly and now I know how to filter out objects. Wonderful!

  • Maybe I'm missing something, but if I set it to "Cursor is over ButtonNormal", the SpriteFont Set position to function appears to execute on ALL sprite fonts for some reason (putting all labels on the button I'm hovering over). Also, all buttons still react to interactions from any button.

    What do you mean by "ButtonNormal pick child ButtonPressed", what does "pick child" mean here? I don't see that as an option anywhere.

    Sorry for the ignorance!

    [Edit]

    AH I see, it's a condition for some reason. What exactly does "pick child" condition do?

  • Hey all, I'm just getting started in Construct 3, though I am extremely familiar with programming (C++/C#/Javascript/etc). I'm just learning this low/no code engine for fun.

    I'm creating a button system, and it works perfectly for one button, but the moment I add two buttons, the system breaks. It appears I'm fundamentally not understanding how Construct 3 picks nodes on events. Can someone please take a look at my button event sheet and tell me what I'm doing wrong here?

    Note that I changed Button. to ButtonNormal. and that fixed most of the issues, though the hover+press logic seems to apply to all buttons when it applies to one.

    Tagged:

  • Does your ship and tilemap have a solid behavior? Are you using an 8 direction movement behavior? Are you manually setting x/y coordinates?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh and this is what I mean by associating an instance before playing an animation.

  • Here's an example of what I'm talking about...

    Notice it's referencing EmptyBox - 15. I cannot define a timeline unless it is specifically referencing an instance of an object type. If I were to delete this object typist he timeline would go blank and have no value (this is how I ran into the issue.. I deleted all instances of the empty box and my timeline change to showing nothing). I fixed it by having a dummy layout with the animation defined, but this seems weird and tacky.

    For the instance variable thing, I tried it again and this time it worked, so I'm guessing it was a weird IDE bug.

  • Coming from engines such as Godot and unity, When I create an instance of an object, I'm expecting it to inherit properties of that object. But I'm noticing this is not the case in Construct 3 and I'd like to understand it better.

    For example, if I create a timeline animation for an object, it's only valid for one specific object. I get 'around' this by creating a scratch scene, animate the object there, and then when I want to animate an actual instance I set the animation instance target first. This works, but seems like a tacky workaround.

    Secondly, I wanted to create an instance level property for the contents of a chest, but it seems that if I create an instance variable, the value is shared by all object instances (not just the variable itself).

    Thirdly, if I create a TileMap, the first instances values seem to be retained for all future versions on other scenes. I can change the contents and the data stays independent, but it's just... strange.

    What am I missing here?

  • No, without tracking the second variable, the condition gets evaluated every frame. I don't want to do no-op DOM updates every single frame for as that'd be incredibly wasteful. I'm just going to keep it the way I have it and consider it a shortcoming of construct I'll have to work around.

    This is as clean as it's going to get I guess...

  • I could, but this is just the mouse part. I'm also going to support joysticks and I want to be able to set the hover state programmatically so for console the user can press the dpad to change the button thats being hovered over.

  • I forgot to remove the variable before taking the screenshot, sorry! I've got it working with the following setup, but I'd prefer to not have to have two chained conditions like this, I'd prefer to be able to say 'if the values are different'.

    Does this make sense?

  • So this is my setup:

    If I were doing this in javascript, i'd have a condition after those two like so:

    if (this.Hovered != this.LastHovered) {
     // Do Stuff
    }
    

    How would I replicate this comparison as a condition?

  • I'm new to Construct 3, but are you suggesting that construct doesn't support comparing one value against another?

  • I'm trying to compare two boolean values, but for some reason it says I need to create instance variables first. I have, and if I use a single instance variable condition the list shows the items, but when I try to compare two, it says I have to create instance items first. Any ideas?