rotation?

eboyeboy Member Posts: 239
edited November -1 in Working with GS (Mac)
I have asked this question before, but i am just not getting it to work, i am new to the gamesalad way....so I would like to have a wave that moves up and down in a random way with a little forward and backward motion. i cant seem to figure out the best way to do it...would u use a rule or how could u set up the rotation....if someone could help me out I could get to the next level. Thanks...

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Maybe if you could draw it out?

    How do you mean 'up and down in a random way with a little forward and backward motion'?
  • eboyeboy Member Posts: 239
    hi, i just want an actor graphic to move up an down with a wave like motion. I haven't been able to figure it out, do you use a timer? how would I get the motion to go up a bit and then down a bit and loop and a little random and maybe add a little rotation clockwise and then counterclockwise. thanks for any help.
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Rotation can be separate from up and down motion.
    Timer: Every 1 seconds: Change Attribute: self.RandomRotate = random(0,1)
    Rule: When Attribute: self.RandomRotate = 0
    --Rotate: Clockwise
    Otherwise:
    --Rotate: Counterclockwise.

    Up and Down Wave Motion:
    Change Attribute: self.InitialY = self.Position.Y
    Constrain Attribute: self.Position.Y = 100*sin(self.Time*200)+self.InitialY
  • ktfrightktfright Member Posts: 964
    how do i make a regular actor rotate by itself like a windmill? (im not controlling the actor)
  • quantumsheepquantumsheep Member Posts: 8,188
    Just put a rotate behaviour in? No other behaviours needed...

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • eboyeboy Member Posts: 239
    you da man. thank you.
  • eboyeboy Member Posts: 239
    what is the difference between

    self.InitialY and self.Position.Y

    where do you find initial Y?

    I really wish you guys would do a few more GS tutorials on the basics of GS, the wiki is sorta limited, in my newbie opinion.
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    self.InitialY is a custom attribute you make so you have a starting reference point.
Sign In or Register to comment.