Changing height only from top
![networ](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hi, I've got problem with interpolating height of actor.
So, I have a rule:
If actor "block01" collide with actor "block02" than interpolate self.height to 0...
It works but it interpolate height to the centre of actor... I need to change the size only from top...
I want effect like "forced back into ground"....
I saw a tutorial from Tshirtbooth when he making health bar he fix this, but my actors are moving, so I can't constrain Y position...Is there any way how to do this?
Thanks
So, I have a rule:
If actor "block01" collide with actor "block02" than interpolate self.height to 0...
It works but it interpolate height to the centre of actor... I need to change the size only from top...
I want effect like "forced back into ground"....
I saw a tutorial from Tshirtbooth when he making health bar he fix this, but my actors are moving, so I can't constrain Y position...Is there any way how to do this?
Thanks
Comments
http://gamesalad.com/forums/topic.php?id=23963
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
constrain attribute self.Position.Y to self.y
Interpolate self.Size.Height to 0
Interpolate self.Position.Y to self.y
I think, I don't understand properly, how this work... Can you help me please?
Thanks again.
So lets say you have an actor 100Px tall and you are going to shrink him to 50 to make it look like its only shrinking from the top you will interpolate the height to 50 and interpolate the y to (self.position.y-25)
___________________________________________________________________________________
TEMPLATES AND PROJECT HELP BY TENRDRMER. CLICK HERE!!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
What you need to do is make a atribute called interpolatevalue (or whatever you want to call it)
In the actor have this:
change attribute interpolatevalue to self.position.y-25
interpolate self.size.height to 50
and interpolate self position y to interpolatevalue
And the duration in both interpolate behaviors have to be the same.
Try it out it works
Hope it helps
My way works as well; more than one way to skin a cat.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I have a template that works perfectly using that method. I just checked it again. Apparently you can no longer use it that way but you sure as hell used to be able to. No one came in here saying your way didn't work. The guy posted that he still couldn't get it after several hours of your help. So I offered him another way.
Hey, let me buy you a pint. Friends?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps