playMaker

Author Topic: Paralysis  (Read 1048 times)

Seiryu33

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Paralysis
« on: May 09, 2015, 10:25:38 AM »
How do i set the Paralysis status effect? That is, arresting a character's movements temporarily? Only way i can think of to do it is to destroy the rigidbody of the character in question but that would be permanent. Any suggestions would be appreciated.

mdotstrange

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
    • Can't code? Who cares! Make games anyway!
Re: Paralysis
« Reply #1 on: May 09, 2015, 11:09:25 AM »
There's a few ways and it depends on how the character controls are set up-

If an FSM controls the players movement- send an event to it that will disable it and another event to re-enable it

I usually have one fsm that takes the input and makes the player move and its usually one state that does it-on that state I can activate it with a global transition called "Mobile"- I have another state in that fsm called "immobile" with no controls- I have a global transition on that state called "immobile"- all I do is send events to mobile or immobile

If a script like the character motor controls the player- you an enable or disable the script using "set property"
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Harvid

  • Playmaker Newbie
  • *
  • Posts: 23
    • View Profile
Re: Paralysis
« Reply #2 on: May 09, 2015, 05:33:00 PM »
If you are new to send event, check out this video