Attribute and Collision Detection Problems when Jumping
scitunes
Member, Sous Chef Posts: 4,047
I cannot get gamesalad to consistently recognize when my actor is ascending or descending. I am trying to make it so my character can jump "through" a platform and then land on it (think doodle jump). I have rules that say when self.linearmotion.y is less than or equal to zero then collide with platform. After getting very frustrated I even added a display text behavior and had the actor display the linear.motion.Y attribute. I cannot get it to consistently check that attribute. I cannot think of a work around. Any ideas?
Comments
Here's what rule I had: the rule within the player:
When all conditions are valid:
Actor receives event: overlaps or collides with actor: standing platform
" " : Invisible platform
Otherwise: Collide with standing platform.
I then created an invisible platform, which was placed just underneath the standing platform, and it worked "okay" but not consistent enough for me to utilize it.
If there are any other options, or better ways to do this, anyone chime right in!
I played around with this, and tried a similar approach to what you described, but it seemed to work fairly well, though there are some general gameplay issues with jumping etc. Take a look and see if it's helpful. I made the source downloadable.
http://gamesalad.com/game/play/28865