Non moveable
GingerBGames
Member Posts: 390
Hello GS'ers,
I have a bad guy, and when my good guy get's within x distance of the bad guy, the bad guy runs towards the good guy, and starts to punch him. My problem is that if my hero keeps walking, then the bad guy is pushed with the good guy. I've tried a rule that when within x distance to change the bad guys self.physics.movable to 0, and false, but it doesn't stop the hero from being able to just push him. How can I make this happen?
Thank you.
I have a bad guy, and when my good guy get's within x distance of the bad guy, the bad guy runs towards the good guy, and starts to punch him. My problem is that if my hero keeps walking, then the bad guy is pushed with the good guy. I've tried a rule that when within x distance to change the bad guys self.physics.movable to 0, and false, but it doesn't stop the hero from being able to just push him. How can I make this happen?
Thank you.
Comments
.
for your question the moveable attribute cant be changed in game.
You can constrain the motion linear x adny y to stop all movemnet, but you should not have to do that at all. If you have your rules the bad guy set up with magnitude like inthe video i , youll be able to put whatver you want to happen once the player gets to far away from him again in the otherwise section of the rule with the mgnitude attribute,