Move Preview 'view' down by 32 pixels? (Spawn enemies outside of visible grid)

0 favourites
  • 3 posts
From the Asset Store
32 hd top-down ships for rts, space rpg & shooters
  • I am currently making a tower defence game.

    The game is grid based and I have already set out all of the 'walls'.

    Map1 is a kind of maze, similar to the Pathfinding demo here: construct.net/en/make-games/manuals/construct-3/behavior-reference/pathfinding

    My settings are as follows:

    Layout.Size: 646x512

    Editor.Grid size: 32x32

    Editor.Margins: 646x512

    My enemy has a Pathfinding behaviour with the following settings:

    Cell size: 32

    Cell border: -20

    Not that it's relevant to the question but each 'wall' of my game fits exactly within the cell grid.

    The main 'grid' of the game (where enemies traverse, players place turrets) is 448 x 448 (14 x 14 cells).

    My editor size is set to 646 x 512 (the additional width being a side panel UI type of thing, to the right of the main game grid, where players can choose the type of turret to place etc).

    It looks like this:

    As you can see, the red rectangle at the bottom is the enemy 'End Goal'.

    And the enemy should spawn in the top right (in one of the 'path' cells (not actually set to anything in the game, just an empty space).

    When I hit Preview, the player can see the empty space at the top of the screen:

    I would like the enemy to spawn outside of the view of the player, so that it appears to 'drive' into the view, as opposed to just appearing at the y=0 coordinate.

    The easiest way would be to move the player view down by 32 pixels.

    How can I do this?

    Or is there any other way to achieve my goal?

  • Trigger Once --> Set scrollY to (512/2)+32

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The above works, although I did not need the + 32.

    Thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)