dop2000's Forum Posts

  • 1920x1080 is the most common choice, you can design your project and prepare all art for this resolution.

    Mobile screens come in all sizes these days, so if you don't want black bars at the sides of the screen you will need to resize the viewport. You can use one of these fullscreen modes: Scale Inner or Scale Outer (recommended).

    construct.net/en/tutorials/supporting-multiple-screen-17

  • With only one turret you can temporarily remove the building from its list of targets, or disable its collisions.

    But if you have multiple turrets and want other turrets to continue attacking the building, then your only option is to acquire targets with events. It's not terribly complicated.

  • If you want proper physics behavior when dragging, check out this example:

    howtoconstructdemos.com/physics-puzzler-move-and-re-arrange-blocks-with-mouse-c3p

  • Here are two examples:

  • hhg21011998

    howtoconstructdemos.com/physics-puzzler-move-and-re-arrange-blocks-with-mouse-c3p

    Wouldn't if var=0, set it to 1 do the same thing?

    Yes, but you have to add extra sub-events to compare the variable.

    Set var to (var=0?1:0) allows to toggle a variable in a single action.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What does var=0?1:0 mean?

    Set var to (var=0?1:0) means "if var=0, set it to 1, otherwise set it to 0"

    en.wikipedia.org/wiki/Ternary_conditional_operator

  • Only Zoom Out works now (CameraZoom=1 event). Zoom In doesn't work.

    That's because CameraZoom can never be 0. Check your logic - first you're adding 1 to CameraZoom, then comparing it to 0. Should be the other way around.

    If you want to toggle a variable between 0 and 1, there are several easier ways to do this:

    Set var to (var=0)
    Set var to (var=0?1:0)
    Set var to (var+1)%2
    

    Or you can use a boolean variable - it has a toggle action.

    how should I credit you in my game (should I ever publish it) for helping me? Your real name or dop2000?

    This isn't necessary, but you can put dop2000 :)

  • On your second screenshot, the last event (Is tween playing) is nested under the parent event (On key pressed). It needs to be a separate, top-level event.

  • when I set gamepad to 0 and the app on 1

    What does it mean? Which app?

    Does it work correctly here?

    hardwaretester.com/gamepad

  • I don't understand why do you use loopindex in arr_crew.At(..., loopindex) expressions. Loopindex will correspond to the nested "While" loop, not the parent "Repeat" loop.

    By the way, instead of the safety_counter you can just use loopindex<200 condition.

    .

    This task would be a lot easier if you use JSON instead of the firstnames array.

    {
     "elves": {
     "male": ["Aelar", "Theren", "Faelar"],
     "female": ["Lia", "Shalana", "Aeris"]
     },
     "dwarves": {
     "male": ["Borin", "Thrain", "Karg"],
     "female": ["Dis", "Hilda", "Brynja"]
     }
    }
    

    To find a random name for any species/gender:

    JSON.Get("elves.female." & int(random(JSON.ArraySize("elves.female"))))

  • After pressing "Z" the screen goes blank. I'm guessing the layout zoomed too quickly for too long?

    No, the screen goes blank because the tween value is always zero. Your mistake is that you are using the wrong action - you need Tween value action, not Tween two properties.

  • Yes, you can use a special object with Tween, or just add Tween behavior to an existing object - say, to a background sprite.

    I tried it and it didn't work for me though.

    Can you post a screenshot of your code?

    Check that the "scale rate" property on layers is set to 100%

  • On start of layout: Set layout scale to 10
    
    On every tick: Set layout scale to lerp(layoutScale, 1, dt*4)
    

    It’s not a great method, because lerp will keep adjusting the layout scale very close to 1 for a long time. I’d use the Tween behavior instead — run a value tween and update the scale with this event:

    Object tween "zoom" playing: Set layout scale to Object.Tween.value("zoom")
    
  • The fact that everyone will use AI then if you don't will be behind is the same like saying everyone is stealing/killing/committing violence, if you are not doing it you will be behind.

    No, you're twisting the argument. We want to use AI for good. What you're saying is "Criminals use knives to rob and kill people, therefore we must not use knives for hunting or cooking."

  • and it reads like you are fine with it and actively push for exactly this thing to happen

    I'm not fine with it, but there's nothing we can do to stop it. Accepting AI and using it in our work is not "giving in" - it's actually a way to stay competitive for a bit longer, before most of our jobs inevitably become redundant.