Setting positions with random?

Hello. I am a guy who has quite a bit of experience with another (somewhat similar) program called Game Maker, and in my previous games, I have had strange twitching effects usually generated with a random() expression. However, I can't seem to get this type of effect to work in GameSalad. I have an actor, JumpBg, and I have a behavior. This behavior is a constrain attribute behavior that sets self.Position.Y to 158+random(0,4). However, this does nothing but set the Y to the random position at the beginning of the scene. This also happens when I use a change attribute. There is very little documentation on either of these important behaviors, and I'm not sure if either of the behaviors set the attribute relative to the expression that is typed in or what. Some help would be appreciated. Thanks
Comments
And you can do it in a timer
insert function random. Then, add in the parenthesis (158,162) & everything should work fine
_________________________________________________________________________________
GameSalad Community Project
Quality Game Making Service
Try making an integer attribute; let's call it Random. Then:
Change attribute Random to random(0,4)
Change attribute self.Position.Y to 158 + Random
See if that does the trick for you.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps