either or, expression

SkyMapleSkyMaple Member Posts: 817
edited November -1 in Working with GS (Mac)
is there an expression to change velocity to either "X" or "Y" angle instead of random?

Comments

  • bluebyu25bluebyu25 Member Posts: 500
    Yes its under self attributes...not the change velocity behavior itself
  • SkyMapleSkyMaple Member Posts: 817
    Currently I have an actor spawning, and flying upward. What I need is for it to either got Diagonal Right OR Left. How can I do this?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    have a attriubte called randommove or whatever.

    make a rule in the actor you spawn when randommove=0

    then put in a move behavior and set the direction diagonally left and have it relative to scene

    make another rule and have when attribute randommove=1
    then put a move behavior in there set the direciton diagonally right and relative to scene

    then when you spawn that actor have a change attribute behavior wherever changing attriubte randommove to random(0,1)
  • bluebyu25bluebyu25 Member Posts: 500
    You can do that or just put random (min,max) and just use the right degrees...I do it in my app. Since obviously a circle is 360 degrees...doing it this way would not make it sharply diagonal left or right, but also everything in between. Just depends what you are going for.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    if you do it like that, it can go in any direction between the min and max so it can go striaght for example, i think he only wants diagonal left or right. but that works too
  • SkyMapleSkyMaple Member Posts: 817
    ok thanks
Sign In or Register to comment.