Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Formula to always have opposite result

Simple Gamer ArtsSimple Gamer Arts Posts: 253Member, PRO
edited April 17 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.)


  • Two.ETwo.E Posts: 452Member, BASIC

    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.

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

    @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.