Help with max Height expression

amigoniamigoni Member Posts: 78
edited November -1 in Working with GS (Mac)
I am trying to display the value of max height reached by my main actor. I create a Height Attribute for the game then in my actor I constrained my game.height to max(self.position.y)

In the display it simply displays the height as if the expression was =self.position.y not max. I wonder how the max expression works. Any hints?

Thanks

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi amigoni, a couple of things: firstly, when highlighting the x in max(x,y) in Expression Editor, you should select your main actor's Position x, so that it reads max (self.Position.X,y).

    Then something seems wrong when selecting the y. It's easy to scream "Bug!" at every opportunity, but in this instance it does seem like it... with y selected, then choosing your game.Height attribute, instead of replacing the y, the expression now reads max(self.Position.X,ygame.Height

    It deletes the last bracket as well. It does something different again if you try to delete the y, or put in the x value first; very odd.

    Anyhow, as far as I can tell, your expression should read: max(self.Position.X,game.Height)

    Hope it's a help anyhow. Perhaps if you or another member confirms there's a bug lurking here, you'll post the info in the Forum Tech Support?

    ---------------------------------------------------------------
    Spiral Gyro Games

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.