bad_wolf's Recent Forum Activity

  • Hi All,

    It seems I run into a lot of problems lately with my labyrinth game. So I do apologize for bothering this helpful community again.

    I have two layouts named "L1" and "L2". I also have a global player (sprPlayer) and an "exit" sprite (sprExit) with an instance variable "strDestiny".

    In "L1" the value of sprExit.strDestiny is "L2". So on collision with sprPlayer, the "L2" layout is shown and the player should wait in the opening on the left.

    sprPlayer has the "Tilemovement" behaviour and the grid is 48x48.

    The problem is that once layout "L2" is visible, the player moves without any keypress to the far right of the layout. This is wrong because he needs to wait in the opening at the left until the player presses one of the arrow keys.

    I created a movie of the wrong behaviour of my game together with screen captures at the end of the event sheets and sprExit and sprPlayer properties. Here is the link where you can watch the video:

    drive.google.com/file/d/1Qqbk8J9x-CxVE2V7g9vofBhvZKzTSLmA/view

    Please, can you tell me what is wrong and how I can correct it?

    Thank you so much for your help which I do appreciate.

    Kind Regards,

    Chris

  • Hello Dop2000,

    Thank you so much for your reply and question.

    The Image point was at x 0 / y 48. This was the cause of my problems. I put it now on x 0 / y 0 and I get the values I am expecting.

    You surely made my day today!

    Your input is appreciated.

    Chris

  • Hi All,

    Please, take a look at the following screen capture:

    Those circular blue sprites are the edge of the layout. The green player is at the top-left corner of the layout. There is no grid offset.

    Now my question: How is it possible that the X - Y position is different?

    Given the position of the player in the screen capture, should the tilemovement location, shown in the middle, not be 1 - 1 or 2 - 2?

    Any idea what the problem is and how to solve it?

    Thank you so much for your help which I do appreciate.

    Chris

  • Hi all,

    I am rethinking the structure of the game. Instead of having one big layout which contains 120 rooms, I am planning to create 120 layouts. Each layout contains one room.

    To switch rooms, I use one invisible sprite and an instance variable which contain the name of the layout switching to.

    It seems more difficult than I originally expected. When I write this in code, it will be much easier to accomplish.

    Chris

  • Hi all,

    I looked at the two example projects suggested above, but neither one does what I intend to do.

    On the exit of my room, I have a sprite "sprExit00_00_00", where the first two "00" stands for the room number, the second two for the X position number and the last two for the Y position number. This sprite is invisible.

    I add an event to that sprite:

    sprExit_00_00_00

    On collision with sprPlayer

    Action:

    -> System: Set scroll X to cintStartPosX_Laby01+cintViewPortShift_X

    The viewport is 768 pixels wide, and the value of cintViewPortShift_X is 1152.

    I do not understand why the viewport shift is 1152 instead of 768 which is the actual width of the viewport and layout.

    I have about 120 rooms in my game, with at least 2 exits but also 4 are possible. So I will have more than 300 sprites in my layouts, which handle the transition process of the room.

    Also, when the player is in one room, he is not allowed to see the next room until he goes through the openings.

    Despite the fact those exit sprites work, I think this is not a good way of doing this.

    Please, can you give me some advice or a method of how I can switch rooms without giving the next room away until the player touched the invisible exit sprite?

    Thank you so much for your help which is appreciated.

    Chris

  • Thank you so much, really appreciate it!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Frederiksthlm,

    Thank you for your reply.

    Please, can you give me the name of that example project? I searched for it but could not find it.

    Chris

  • Hi Diego,

    Thank you for your reply. I could not open your link yet, because this computer does not allow me.

    However, what you described is what I want. When the player goes through the opening, then the next full room comes into view (the former one is no longer visible). A new room always has to be a surprise for the first time user.

    Your input is much appreciated.

    Chris

  • Hi again,

    Just a quick update.

    I experimented with adding the "Scroll to" behaviour to my player sprite. This moves the room into view when I move my player sprite.

    However, the new room has to be shown when the player sprite just steps outside the border of one room into the new room.

    At this moment, I do not know how to accomplish that.

    Somebody, any idea?

    Chris

  • Hi all,

    Please, can you help me with the following problem?

    I have a layout which is 3072 pixels wide and 1920 pixels high. My viewport is 768 pixels wide and 480 pixels high.

    I placed my viewport in the left-bottom part of the screen with the following line:

    System --> On start of layout

    Action --> System: Scroll to (cintStartPosX_Laby01, cintStartPosY_Laby01)

    This moves the viewport to the location bottom-left.

    Now on the right I have an opening in my layout and when the player goes through that opening, the next room on the right has to move into the viewport.

    So I have the following event/action:

    sprPlayer --> Is out side layout

    Action --> -> System: Scroll to (cintStartPosX_Laby01-768, cintStartPosY_Laby01)

    cintStartPosX_Lab01 constant value is 0

    cintStartPosY_Lab01 constant value is 1920

    So I assume that this event will move the viewport to the other room on the right.

    However, nothing is happening.

    I searched but cannot find what I am looking for.

    Please, can you tell me how I can detect that my player is outside that opening and How can I move the viewport in a way that the first room slide to the left until the new room is fully in position?

    Thank you so much for your help, which I do appreciate.

    Chris

  • It's like the "origin" point for the sprite object, right? I do not think that is possible.

    But you can centre the content of the HTML element object horizontally and vertically. Also, by using CSS-Grid, and relative sizing, you can make sure your balloon is always in the middle and visible.

    This is just my thinking, how I should do it. Maybe it is worth a try?

    Chris

  • Was it really necessary to post such a hate message? Please, be professional or just keep quiet. Let's respect each other!

bad_wolf's avatar

bad_wolf

Early Adopter

Member since 14 May, 2017

None one is following bad_wolf yet!

Trophy Case

  • 7-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

12/44
How to earn trophies