dop2000's Forum Posts

  • I suggest completing the guided tours (one, two) and browsing the built-in examples.

  • You can upload a screenshot to Imgur or similar service. Or share your project file.

  • I suspect that "On gamepad button pressed" is a fake trigger in Construct — meaning that it's only evaluated at the moment when the event sheet reaches that condition during the normal top-to-bottom event processing. Since your running events come first on the event sheet, the character starts running before turning.

    To fix the issue, re-arrange the events in this order:

    imgur.com/a/IMHNeZI

  • When I select a file and press "Upload image" button, I get this error message:

    An unexpected error has occurred [error ]

  • Instance variables are saved the same way.

    imgur.com/a/6aFBtC6

  • Here is a screenshot:

    imgur.com/a/bgc8rw8

    I recommend using number variables instead of boolean, it's easier - simply set 1 for true, 0 for false.

  • I've explained this so many times in many posts, but people keep making the same two mistakes:

    1. You should never use Trigger Once condition with objects that have multiple instances. Trigger Once doesn't work per instance!
    2. You have events that run on every tick with Wait action in them. This creates lots of delayed threads, which will continue running for several seconds. Never use "wait" in events that run on every tick! It will break the game logic.

    Instead of "Trigger once" use some condition like "is pinned" or "turret enabled". Instead of "Wait" use the Timer behavior to destroy guns.

  • Save where?

  • If I enable Unbounded Scrolling for the layout, an empty screen becomes visible at the bottom.

    Screen shake doesn't work when there is nowhere to scroll. You need to:

    • enable the Unbounded Scrolling
    • use a separate Camera sprite with ScrollTo behavior (its size doesn't matter)
    • move tha camera to player position
    • limit the camera movement to layout bounds

    Example:

    dropbox.com/scl/fi/ins0stjp4a58gxdoryh9v/BoundedScroll-with-shake.c3p

  • Do you need to jump through these platforms up, or fall through down?

    I haven't tried it, but perhaps you can use both JumpThru and Solid behaviors. On pressing jump or down key - disable Solid on nearby platforms. When the character is on the ground - enable Solid.

  • Turns out I needed to add a wait command in the following code:

    Why do you set AllEnemiesDefeated to true immediately at the start of layout?

    Deactivating/activating the groups as Igor has suggested is a better solution than adding a wait.

    Another good option is to load the array in advance in a separate layout (say, in the splash screen or loader).

  • I set a text box as one of the cells in the Array to see if I could get the value to show. It came back with the value 0, it shouldn't be that.

    Can you show this code too? The entire event, or even the entire event sheet.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you want to spawn the missiles at the player's current location, then use player coordinates instead of fixed values.

    For example:

    Create missile at (Player.x, Player.y-200)
    Create missile at (Player.x-300, Player.y-200)
    Create missile at (Player.x+300, Player.y-200)
    

    Or, you can spawn them relatively to the viewport:

    Create missile at (ViewportMidX("layer"), ViewportTop("layer")-80)
    
  • It's better to use a variable - increase the variable and set the text to that variable.

    Without a variable you'll need to convert the text to number and back.

    Textbox set text to str(int(self.text)*1.5)

    or use float() expression instead of int() if you need decimals.

  • Obj.Pathfinding.Speed expression will give you the current speed. You can save it in a variable on every tick to check if the object is accelerating.

    if Obj.Pathfinding.Speed>savedSpeed : // is accelerating
    
    On every tick: Set savedSpeed to Obj.Pathfinding.Speed