Yann's Forum Posts

  • sliders.capx

  • Greg R0J0hound

    I see, in some rare cases the algo skip the wall check.

    It can happen only if Player.move reach 0 without going into negative values. And the lower the speed the more likely it can happen.

    Greg, to correct the problem you just have to put in event 10:

    Player: move = 0 
      -> System: Set timer to max(0,timer-dt)
      -> Player: Set checked to false  <-- that
  • Martifou now yes

  • Greg

    There's no such bug on my side, I used this system in tones of different situations (including patroling AI) and never had any issue even at super high speed.

    Do you get this bug in the original capx, or in a modified version of yours?

  • I think you'll have to share a bit of capx for this one.

    If you're moving your sprite properly, fps shouldn't interfere with how long your animation is.

    For instance, if you want to move a sprite 100px to the right in 3seconds

    You should do something like:

    Every tick -> Sprite: set X to self.X+100/3*dt

    As dt is the time (in second) between the last and the current frame, no matter how much fps you have, after 3 secondes things should add up to 100.

  • well now we should use the import files features of c2 so that it will work in preview mode.

    The preview mode doesn't work because because browsers or server (I don't remember) block ajax's cross domain requests unless the server sends header that allow it.

    But using the import files, the files are exported when preview in the same place as the script and accessible via localhost.

    Should update my old capx maybe...

  • first, I think I should have made clear that all should be string

    0-20 = -20

    you should use "0-20"

    Then to get the min and max values it's juste tokens

    so you just have to compare your values like this:

    value < int(tokenat(range,0,"-"))

    value > int(tokenat(range,1,"-"))

  • Elyzius you're welcome (:

  • There's

    +Sprite: Opacity < 100 
      -> do nothing
    +Else
      -> do your thing 

    The idea is that, if at least one sprite has an opacity under 100 the else will never be triggered, because it's a logical else that doesnt mess with picking.

  • Global number Dtimer = 0 // timer for the D key
    Global number sensibility = 0.4 // time in second between two D pressed
    + On D pressed
      + Dtimer greater than 0
        -> set Dtimer to 0
        -> it's a double D pressed set your action here
      + Else
        -> set Dtimer to sensibility
    + Every Ticks
      -> set Dtimer to max(0,Dtimer-dt)

    (pay attention to what is in sub event)

  • regenMaze.capx

  • Not really, to debug you just "choose" to show what you want to know (variable values) in a text object with events.

    It's enough most of the time since construct shouldn't output code that leads to crashs (thus stopping the javascript being executed)

    Nimtrix

    http://en.wikipedia.org/wiki/Breakpoint

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nah the hanging from the chin effect is the reason why you should use a rectangular sprite for collisions, and more or less how I discovered it (: (2 years ago)

    You also need this rectangle for the platform logic. The collisions on animation are less stable. If you animate a run cycle, on some frame the feet shouldn't touch the ground. If they were to be used as collision you'd see some vertical wiggling.

  • <img src="https://dl.dropbox.com/u/23551572/C2/meme/perfect%20collision.jpg" border="0" />