Actor not moving even tho Movable is enabled

EpicoreGamesEpicoreGames Member Posts: 188
edited June 2015 in Working with GS (Mac)

I set my actor's movable ( the green actor ) to False and i put another button ( the orange actor ) to enable the green actor's movable boolean ( it is controlled by an integer , when that button is pressed , that integer will change its value to 1 , and when the value of the integer is 1 , the green actor's movable will become true ) .

P.S. there is a Motion Linear x in the green actor which was set to 150 to let it run . The green actor is also set to show its Movable boolean .

But i had pressed the orange button and the movable boolean of the green actor did change to true but it didn't move as shown in the pictures below . The white actors are used to proof that the green actor stayed still at the same position .

Did i miss anything ?

Reference Pictures :
http://postimg.org/image/em2wd2r1x/
http://postimg.org/image/dj7emxgfr/

Comments

  • IceboxIcebox Member Posts: 1,485

    The physics attributes cannot be changed during game run time , im not quite sure but I read earlier posts that said that and i tried it myself and I couldnt change them , so you will have to keep it moveable.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited June 2015

    @EpicoreGames, @Icebox1910 is correct. You can't change Moveable during gameplay. If you want your actor to be moveable you must turn that on in the physics settings of the actor to start with.

    If you need to make an actor moveable and then not moveable you'll need to create a boolean attribute and use that to turn make the actor moveable/un-moveable. Like:

    Create attribute named Move and set it to false.

    Then in your actor make a rule that says:

    If Move = true
    Move the actor
    Otherwise
    Don't move the actor
    

    Them make Move true and false as needed.

    Of course that is not real code, just a general idea of format. You're actual code will depend on your game.

    Hope that helps.

  • EpicoreGamesEpicoreGames Member Posts: 188

    Ok thanks @jamie_c and @Icebox1910 . Ill try the method you mentioned , Jamie.

Sign In or Register to comment.