trouble manually control platform behavior(help with logic)

This forum is currently in read-only mode.
From the Asset Store
100 items casual and logic games. All icons are of a high quality.
  • trying to make sprite go to 'goalx' and accelerate within the limits of normal platform movement

    can anybody see why this doesn't work (it's all one line, but it's line broken for readability):

    Set Sprite Platform X Component of Motion

    clamp(sprite('goalx')-sprite.x,
    
    max((sprite[Platform].VectorX-(1000*timedelta*sprite[Platform].FloorAccRate)),0-sprite[Platform].MaxFloorSpeed),
    
    min((sprite[Platform].VectorX+(1000*timedelta*sprite[Platform].FloorAccRate)),sprite[Platform].MaxFloorSpeed))[/code:lgay6mab]
    
    here's an example cap of it not working
    hover the mouse over the blue box to use regular platform controls with the arrow keys
    or click somewhere to watch the sprite move with the algorithm above to where you clicked
    [url]http://dl.dropbox.com/u/1013446/notwork.cap[/url]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)