tulamide's Recent Forum Activity

  • Changed host to dropbox, hope it works now...

  • Yes

  • I'm not sure what you mean. My avatar is not shown? I didn't change anything and I can still see it...

  • Ok, so you need to calculate the scroll center based on the player sprite. When the player sprite is at x = 300, then the left edge of the visible screen should always be 200, no matter the zoom. And when it is at x = 960, then the left edge should be 860, etc?

    Scroll to x

    PlayerSprite.X - 100 + (DisplayWidth / 2) * (100 / ZoomX)[/code:3hqapjqi]
    
    [i]Without being able to validate it, I don't have Construct at the moment[/i]
  • You mean 100 "unzoomed" pixels, while zoomed?

    When zoomed to 200% every pixel uses 2x2 "unzoomed" pixel, so you would need to move the cam 50 pixels to the left instead of 100. So I would say it is

    currentX - 100 * (100 / zoom)

    EDIT: Ups, to the left, sorry. Corrected to minus...

  • Don't worry, your progress is saved per level

  • The really cool games deserve to be played...

    A house in California

    e7

    Have fun

  • Yes, that will be it.

    The first layout has the number 1, if you would have a total of 3 layouts, then number 3 is the highest number you can go to.

    The problem of counting 2x per level could be that the condition for counting up ist still true when entering the new level. Unfortunately, my pc is broken-down, and this 11-year old antique computer I have to use until my pc is repaired refuses to install Construct, so I can't look into the cap.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are a lot of possible causes for this. One of the most common is using two conditions one right after the other for switching. If that's the case here, then this post may help you.

    Also, check for a correct animation frame speed.

    If both tips don't help, setting up a demo cap showing the problem helps a lot helping you

  • Can't look into your cap, it sounds like something may go wrong with the counter.

    However, there is no easier way then using 'go to layout'. You are not forced to use numbers, though. If you name your layouts, you can use the names as strings as well. If a layout is called 'uberlevel' then you'd call it with

    go to layout "uberlevel"

  • I wouldn't recommend doing it this way.

    You are defining a function over and over again on every tick. With Python's garbage collection this will be slow (and not needed)

    A better way would be:

    + Start of layout

    -> Python script

      check = 0 temp = 0 def move(speed): global check, temp if(check == 0): temp = Sprite.X check = 1[/code:2p20bdhr]

    + is moving

    -> Python script

      move(Sprite8Direction.speed)[/code:2p20bdhr]

    + Always

    -> Text: Set text to Sprite.X

    -> Text2: Set text to str(Python("temp"))

  • You shouldn't think of Python code being seperate just because it is visually seperated. Python is active from the moment you activate it, you just don't see it.

    + Start of layout

    -> Python script

      count = 10[/code:5i4fg5ka]

    + On button left clicked

    -> Python script

      count += 1[/code:5i4fg5ka]

    + On button right clicked

    -> Python script

      count -= 1[/code:5i4fg5ka]

    Although visually seperated, every time button is left clicked it will add to count: 11, 12, 13, etc. And if button is right clicked it will substract from it. That's just one variable 'count' throughout the whole project, not three independent variables.

    So, just use the events to your advantage, to control how and when Python is used.

    + Start of layout

    -> Python script

      temp = Sprite.X def move(speed): # your movement code here, incl. using temp[/code:5i4fg5ka]

    + Always

    -> Python script

      move(200) # calls your previously defined function[/code:5i4fg5ka]

    This all from my head (my pc is broken-down). But it should work.

tulamide's avatar

tulamide

Member since 11 Sep, 2009

Twitter
tulamide has 3 followers

Trophy Case

  • 15-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

17/44
How to earn trophies