Using a squared score / Accelerometer changing actor location
I got 2 questions for this one.
1. I'm trying to square my score and I'm having a difficult time figuring out which one it should be. I tried: game.score + pow((game.Redactive*10), 2). Its an attempt to add whatever num redactive is times by 10 and squared to score. No matter what redactives was it was giving me an add of 10.
2. I'm trying to make it so that the score display always goes to the top of the screen just like rotating the phone from portrait to the upside down would rotate it except I don't want any other actors changing position in that way. I just want it to basically move to the top of the phone no matter which angle I turn it. Ive tried using accelerometer, but if lets say X acc was changed and it is set for Y it sometimes gets stuck on the bottom when it should be top and then it continues changing in opposites. (I also plan on rotating it as well, but just trying to get this part to work first). There an easier way to do this maybe so the phone rotation only works on that actor or something?
Any help is always appreciated... thanks
1. I'm trying to square my score and I'm having a difficult time figuring out which one it should be. I tried: game.score + pow((game.Redactive*10), 2). Its an attempt to add whatever num redactive is times by 10 and squared to score. No matter what redactives was it was giving me an add of 10.
2. I'm trying to make it so that the score display always goes to the top of the screen just like rotating the phone from portrait to the upside down would rotate it except I don't want any other actors changing position in that way. I just want it to basically move to the top of the phone no matter which angle I turn it. Ive tried using accelerometer, but if lets say X acc was changed and it is set for Y it sometimes gets stuck on the bottom when it should be top and then it continues changing in opposites. (I also plan on rotating it as well, but just trying to get this part to work first). There an easier way to do this maybe so the phone rotation only works on that actor or something?
Any help is always appreciated... thanks

Comments
What you are doing should be working but try this to make sure everything else is valid.
game.score + [ (game.Redactive * 10) * (game.Redactive*10) ]
That is solid and fail-safe.
It happens to me all the time. You probably have constrain instead of change.
Go to attributes, select "score" and press the minus ( "-" ). It will pop a screen listing which actors using it. Just check you don't have anything unexpected..
One of my errors (but it didn't fix it till I did that exact format above) was that I had it in a timer that was happening after .3. But like I said even after taking one of the colors out to test out what was going on it was still not working. Very curious it is. Thanks for sticking around and helping cbt.
Anyways I'm happy you solved it. Good luck with your project.