Problem with change attribute
Hi
I'm working on a new game and have a really weird problem.
I need to stop my scrolling background when some conditions are reached.
So I put an attribute scrollstop to my game when scrollstop=0 scroll is working when scrollstop=1 background scroll stops. I put an actor for testing with rule when I press space attribute change and scroll stop.Eveything works ok.
Now I want to stop the scrolling when distance between two actors are equal 352.
So I put constrain attribute to a new attribute called distance where distance is actor1 x position - actor2 x position.And now when distance=352 change attribute scrollstop to 0.
It doesn't work!!!!
For testing purposes I put an actor with display text behavior to watch distance attribute and see what is happening.
When distance reaches 352 nothing happened, scrolling don't stop and attribute doesn't change.
What's going on?
I even tried abs and floor functions to determine the exact value and nothing. This is crazy.
I'm working on a new game and have a really weird problem.
I need to stop my scrolling background when some conditions are reached.
So I put an attribute scrollstop to my game when scrollstop=0 scroll is working when scrollstop=1 background scroll stops. I put an actor for testing with rule when I press space attribute change and scroll stop.Eveything works ok.
Now I want to stop the scrolling when distance between two actors are equal 352.
So I put constrain attribute to a new attribute called distance where distance is actor1 x position - actor2 x position.And now when distance=352 change attribute scrollstop to 0.
It doesn't work!!!!
For testing purposes I put an actor with display text behavior to watch distance attribute and see what is happening.
When distance reaches 352 nothing happened, scrolling don't stop and attribute doesn't change.
What's going on?
I even tried abs and floor functions to determine the exact value and nothing. This is crazy.
Comments
Rule
when (position x actor 1- position x actor 2) = 352
or when (position x actor 2- position x actor 1) = 352
change attribute scrollstop to 0
Giacomo
put an actor with display text position x to watch the actual position and when it reaches 250 nothing happened.
Maybe GS Messed up somehow and I need to reinstall it?
This is impossible to basic rule doesn't work.
Maybe try using greater than or less than??
I have a move behavior on actor no accelerate and as I said I tried also abs and floor to get even numbers and this also doesn't help.
I think I will back to 9.4 and wait until 9.5 is fixed. My previous project doesn't work at all on 9.5 , it used camera.origin attribute and 9.5 freezes when you try to use it. It seems that 9.5 is totally messed up and unusable.
For everyone who don't know what the floor function is. This function round down a decimal to nearest integer.