playMaker

Author Topic: best way to freeze a character in place  (Read 9562 times)

mikejkelley

  • Full Member
  • ***
  • Posts: 136
best way to freeze a character in place
« on: July 28, 2014, 10:43:53 PM »
I've been using Get Position Set Position but I imagine this is the least graceful way to do that.

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: best way to freeze a character in place
« Reply #1 on: July 28, 2014, 11:19:32 PM »
How are you controlling your character? You could turn off your controller and any gravity on the character using the SetProperty feature. This is how I do it.

Or you could even set the speed variable and gravity to zero. And as soon as you are ready to control the character, simply turn it back on.

mikejkelley

  • Full Member
  • ***
  • Posts: 136
Re: best way to freeze a character in place
« Reply #2 on: August 14, 2014, 09:38:33 PM »
Turning off the controller worked well, thanks! :)

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: best way to freeze a character in place
« Reply #3 on: September 07, 2014, 11:09:46 PM »
Turning off the controller worked well, thanks! :)

How so? Because I am trying to set up a game where I freeze or stop the character from moving when they cleared a level.

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: best way to freeze a character in place
« Reply #4 on: September 08, 2014, 12:54:18 PM »
Set Property > Specify Character Controller > Enabled. Make sure the check box isn't checked on the state action and you should no longer be able to control the character.

You could likewise change the speed variable to 0.

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: best way to freeze a character in place
« Reply #5 on: December 24, 2014, 11:36:45 PM »
Set Property > Specify Character Controller > Enabled. Make sure the check box isn't checked on the state action and you should no longer be able to control the character.

You could likewise change the speed variable to 0.

What is the difference between Specify Character Controller vs Enable Behavior?

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: best way to freeze a character in place
« Reply #6 on: December 30, 2014, 10:07:30 AM »
Specify Character Controller is essentially telling your action too look for the controller on your character.

Enabling Behaviors is whether or not that component is turned on or off. If the component is on, your player can control the character. If it is off, the character controlling behavior will be off so your the character is essentially frozen. When you wish to control the character again, simply enable or the turn the behavior on.

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: best way to freeze a character in place
« Reply #7 on: December 31, 2014, 02:56:37 PM »
Specify Character Controller is essentially telling your action too look for the controller on your character.

So that would be the best option ultimately for the character to trigger a game over type of event? I've been trying to get the hang of ending level properly.

Enabling Behaviors is whether or not that component is turned on or off. If the component is on, your player can control the character. If it is off, the character controlling behavior will be off so your the character is essentially frozen. When you wish to control the character again, simply enable or the turn the behavior on.

So compared to Enable or Finish FSM actions, this is the best possible outcome if you trigger a event freezing or stopping the player as a  alternative to Specify Character Controller?

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: best way to freeze a character in place
« Reply #8 on: January 05, 2015, 12:46:50 PM »
This is the method I've used without any trouble. It was the solution that worked for me before I realized Enable/Finish FSM actions existed.

Once I've finished my current project I will try this method instead and get back to you.

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: best way to freeze a character in place
« Reply #9 on: January 07, 2015, 11:37:46 PM »
This is the method I've used without any trouble. It was the solution that worked for me before I realized Enable/Finish FSM actions existed.

Once I've finished my current project I will try this method instead and get back to you.


I'd like to know what results you get when you can? Because on my end it hasn't worked so I used destroy component instead. Heres what I have for it.

https://db.tt/6WuMWxGO