How do you get a moving actor to stick to walls?
Hi guys,
I have an actor that I want to stick to another actor when it collides with it. For instance if it hits a wall it should stick to where it hit.
I tried changing it's movable attribute to false, but it just carries on falling.
-Guardian
I have an actor that I want to stick to another actor when it collides with it. For instance if it hits a wall it should stick to where it hit.
I tried changing it's movable attribute to false, but it just carries on falling.

-Guardian
Comments
Change attribute self.velocity.y to zero.
If you have gravity in your game, change that to zero as well.
~t
I have changed the linear velocity x and y to 0 on the actor.
I do use gravity, but how do I change the gravity? I can't seem to find it in the list of attributes on the 'Change Attribute' behaviour.
Woot! my first helping post
~t
I created an empty actor. I placed it on the stage (I assume that meant in the scene) and well I couldn't see an "unlock" option.
Where is this option? :S
This didn't work.
Give it a go.
~t
Only instances have access to the scenes attributes. So you meant add the actor to the scene, then unlock it and then you can use 'Change Attribute' to change the scenes attributes.
Thank you guys
Search for Beyond the Basics in the New section of the launchpad and it should pop up or go here http://gamesalad.com/game/45386
Woot! For some reason though the publishing part of the app didn't allow me to choose an image, they were all greyed out.
~t