Formula to always have opposite result

Simple Gamer ArtsSimple Gamer Arts Member, PRO Posts: 302
edited April 2018 in Working with GS (Mac)

I want to constrain my HERO actor the negative value of X actor.

if X actor = 10.... I want my HERO actor to = X actor - 10
if my X actor = -8... my HERO actor should = X actor +8

How could I go about this in a formula? Thank you!

(To be super real, my scene.rotate is the "X actor" and my Game Over pop up screen is my "HERO" actor in the examples above... So, my objective is to keep the Game Over screen always = to "scene.rotation 0"... cause I don't want it to be in an angle when it pops out.)

Comments

  • Two.ETwo.E Member Posts: 599

    Hello @Simple Gamer Arts

    I would say the best way to achieve this is to simply multiple the position value by minus 1.

    It sounds like you will need to constrain the X Actor position to a Game Real Attribute.
    This way, the HERO actor will have access to these values.

    Then simply change, or constrain the HERO values to the Game.Real Attribute * -1.

    Hope that helps.
    Best,
    Two.E

  • Simple Gamer ArtsSimple Gamer Arts Member, PRO Posts: 302

    @Two.E Just 1 min ago, before seeing your suggestion, I think I solved it by simply writing out the rule in an unlocked character:

    when game over screen appears, change scene.rotate to 0

    But I'm actually going to use your suggestion for another part of my game which really needed the opposite result. THANK YOU!

Sign In or Register to comment.