Custom collision help
devospice
Member, BASIC Posts: 16
I'm developing a side-scrolling platform game and I need some custom collision detection since the bounce behavior isn't what I want to happen.
Basically, I want the character to walk by a vase on a table and knock it onto the floor. To do this I set the vase to not be movable. Then added a rule where if the character collides with the vase set the vase to movable. I expected the vase to fall to the floor at that point. (It has a collide with floor behavior already.)
If I set the vase to be initially movable then it falls to the floor as expected when I start the scene, but setting the movable attribute in a rule doesn't seem to work.
I've tried changing the velocity, acceleration, everything to make it move and nothing works. I can change the rotation, add particles, and change the actor's image, but I can't get it to move.
Am I doing something wrong or did I find a bug in GameSalad?
Thanks.
Basically, I want the character to walk by a vase on a table and knock it onto the floor. To do this I set the vase to not be movable. Then added a rule where if the character collides with the vase set the vase to movable. I expected the vase to fall to the floor at that point. (It has a collide with floor behavior already.)
If I set the vase to be initially movable then it falls to the floor as expected when I start the scene, but setting the movable attribute in a rule doesn't seem to work.
I've tried changing the velocity, acceleration, everything to make it move and nothing works. I can change the rotation, add particles, and change the actor's image, but I can't get it to move.
Am I doing something wrong or did I find a bug in GameSalad?
Thanks.
Comments
Why is it that you can't just use collide to control your collisions?
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Do you use gravity? If not make the vase movable.
Then in a rule say
when colides with actor "character"
accelerate 1000 down. (270 degrees)
Hope this helps.
Lump Apps and My Assets
The vase is on a table. The character can walk in front of the table or stand on it. Yes, I'm using gravity. I can make the vase collide with the table but then there's no way for it to fall straight down. (Can I remove a Bounce behavior at run time? I don't think so.)
It seems odd that the movable attribute can't be set at run time. If that's the case then I shouldn't be able to select it from the menu.
I may not be able to do this. I may have to just have the character push the vase off the end of the table.
By the way, I am LOVING GameSalad. I've been programming video games using one technology or another (mostly in Director) for about 18 years. I think I've found my new development environment! Now, just please don't go the way of Director.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page