Rap's Forum Posts

  • 7 posts
  • Can't reproduce in r129. Which version did you test?

    Thanks for the reply Ashley. I was actually using r126. I upgraded to r129 and the bug is no longer present.

  • I think I may have found a bug but I don't have permission to post in the bug forum.

    Steps to reproduce bug:

    1. Add a sprite to the Layout1.
    2. Add any behavior that has attributes to it. I chose Sine.
    3. Modify the behaviors attributes.
    4. Create a new layout.
    5. Drag the sprite from the Object types folder into the new layout.
    6. All of the Sine behavior's attributes are now reset to the default.

    This bug seems pretty serious. I have a character that has tons of behaviors on it all tuned how correctly, and then when I add him to a new layout all the attributes are reset.

  • I forgot to mention that 'VelocityX' is an instance variable of 'ScrollHistory'. Does that help? What problems are you having specifically?

    It might be an issue of project settings. I have my window size set to 800x480 and the layout size set to 2800x1024. Unbound scrolling is set to No. Make sure the layout is much wider than the window.

    Also make sure that in your 'Touch' instance you have 'Use mouse input' set to Yes. This will let you test it in the browser.

  • Thanks to the great replies everyone!!

    Laurent

    I can't upload my capx due to it containing original art for a commercial project. But, I can take a screen cap of my event page as its pretty short and the algorithm isn't too complex.

    http://i.imgur.com/kAtCO.png

    Sorry for the quality, but it was the only way I could get it all onto one page without editing anything :)

    Good luck!

    EDIT: The 'ScrollHistory' and 'TimeHistory' are two arrays added to the layout. 'ScrollHistory.HistoryLength' is the max amount of history snap shots that you want to store. I keep this around 5 and I recommend you don't go any higher as it will consume unnecessary resources. Other than that everything should be self-explanatory. If you have any questions don't hesitate to ask!

  • I'm making a side scrolling game and I want the player to be able to flick the screen to scroll the view. Much like most modern smartphones. I have it working now like this:

    Touch started:
      Store AbsoluteX into global variable TouchStartX
    Is in touch:
      set scrollx = scrollx - (Touch.AbsoluteX - TouchStartX)
      Store AbsoluteX into global variable TouchStartX again
    

    This allows me to scroll but it doesn't take the velocity of the flick into account to keep the screen scrolling. Has anyone implemented this?

  • Nevermind! Figured out that if I have 8 frames and each is spaced 100px apart, it obviously must be an 800px wide image <img src="smileys/smiley9.gif" border="0" align="middle" />

    Support for irregular frames would be a great feature addition though!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How should I size and space my sprite sheet? Every time I try to import my sheet into Construct it cuts it very strangely and pieces of the next frame get included in a previous one. Is there a default rectangle size? The image also isn't centered in the frame that Construct 'guesses'.

    I must be doing something wrong...

    Thanks!

  • 7 posts