Turning movable on and off

steeler0038steeler0038 Member Posts: 153
edited November -1 in Working with GS (Mac)
So i have this box in my game. I have this box set to not movable. And then i have this button in my game that when it is pressed, it turns the movable on in the box. I have a game attribute set up and i have it that when button is pressed, attribute is true. and in the box, i have it set where attribute is true, turn movable to 1. But this doesn't work. Any help?

Comments

  • app-etiteapp-etite Member Posts: 139
    I dont think you can adjust movable while in gameplay :\
  • steeler0038steeler0038 Member Posts: 153
    your right app-etite, i worked around it tho :)
  • DrGlickertDrGlickert Member Posts: 1,135
    You can't edit physics of actors in the game. :-(
  • FrozenDingoFrozenDingo Member Posts: 17
    I'm trying to do something similar..

    Any chance you could post your work around please? :)
  • steeler0038steeler0038 Member Posts: 153
    Create a game attribute equal to 0. So then, if you have a button to activate a box in your scene, create a rule in your button that says when pressed, change attribute = 1. And then, when you code everything in your box, make sure that every rule starts with "when attribute is = 1".
  • devjohnsondevjohnson Member Posts: 94
    I did something like this in my game yesterday.

    I set 2 attributes for the actor for its position when I tapped the actor.
    Then, I constrained its positioned to where it was tapped (using the 2 attributes) in order to make it stop moving where I tapped the actor at.

    _________________________________
    My Development & Tech Blog
  • FrozenDingoFrozenDingo Member Posts: 17
    Thanks steeler0038!

    Works great!!
Sign In or Register to comment.