Upon collision, I can't make my actor change its size...
iCreationZ
Member Posts: 158
I have a rule, when actor falls off a cliff, change a Boolean attribute to true.
However, if I try a rule like this:
When Boolean = true
--> Interpolate width & height to "X"
Otherwise
--> Interpolate width & height to "Original size"
"X" = my specified size
This doesn't work, so I tried doing the same but with the change size behaviour within a timer container, so when attribute is true, grow, otherwise shrink.
This too failed to work. What happened on both occasions was that the actor would sort of flicker between the two sizes in a very rapid but irregular way. If I remove the change size rules and replace them with change alpha for example, it works perfectly...
I can have an actor display the Boolean attribute so I an clearly see that that is functioning correctly, which it is.
Any ideas?
Thanks!
Ps: I am working on a PC!
However, if I try a rule like this:
When Boolean = true
--> Interpolate width & height to "X"
Otherwise
--> Interpolate width & height to "Original size"
"X" = my specified size
This doesn't work, so I tried doing the same but with the change size behaviour within a timer container, so when attribute is true, grow, otherwise shrink.
This too failed to work. What happened on both occasions was that the actor would sort of flicker between the two sizes in a very rapid but irregular way. If I remove the change size rules and replace them with change alpha for example, it works perfectly...
I can have an actor display the Boolean attribute so I an clearly see that that is functioning correctly, which it is.
Any ideas?
Thanks!
Ps: I am working on a PC!
Comments
So we need to look at the behaviors inside of your When Boolean = true rule:
--> Interpolate width & height to "X" ["X" = my specified size]
Otherwise
--> Interpolate width & height to "Original size"
So you're having the actor grow when the boolean attribute is true. Does that work? What happens if you turn off the behavior in the Otherwise section?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
other wise you could make a second rule rather then using the other wise.
2nd rule
if the Boolean "touching wall" is false
and
players X width is = to increased size
Interpolate back to the original size
And yes, the time for interpolate is identical in all four instances, changing width & height on both occasions.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
If I swap out the "When attribute Boolean = true" for "when actor collides/overlaps with actor of type "Hole" to remove that variable, the same issue still occurs.. #-o
If I get a chance, tomorrow I'll try it on a Mac...
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks for the offer though!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User