Does anyone know this?
Billyd1
Member Posts: 133
Does anyone know how to make a actor expand when touch is pressed?
Comments
change attribute self.width to X
change attribute self.height to Y
// Red Dot Inc
Use 2 interpolate behaviors for actor's height and width and set the duration for the expansion,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
actually if you put your change attributes inside a timer (with microsecond interval), it will have the same effect as interpolate. Interpolate is just convenience.
Rule
When any conditions are valid:
self.Size.Width < self.myMaxWidth
self.Size.Height < self.myMaxHeight
-----Timer Every 0.01 seconds
----------Change Attribute: self.Size.Width To: self.Size.Width+[some number]
----------Change Attribute: self.Size.Height To: self.Size.Height+[some number]
I believe Interpolate does not update the collision area until the Interpolation is complete. That is how it used to be. Perhaps it has changed.
If you don't need collision while expanding, I would use Interpolate.