playMaker

Author Topic: UFPS - Action to set a State for Player and Camera  (Read 5590 times)

brisck1

  • Playmaker Newbie
  • *
  • Posts: 40
UFPS - Action to set a State for Player and Camera
« on: January 08, 2014, 09:45:24 AM »
So I'm using UFPS in my project and downloaded the Playmaker actions for it, but one thing that's missing that is really essential to interacting with UFPS via code is an action to change States in Vp_FPController and Vp_FPCamera. These are predefined states such as crouching, swimming, Death, etc.

Right now I'd like to be able to trigger a change in states via Playmaker, but despite my best efforts have been unable to figure it out, even with send message and set properties.

brisck1

  • Playmaker Newbie
  • *
  • Posts: 40
Re: UFPS - Action to set a State for Player and Camera
« Reply #1 on: January 15, 2014, 06:22:50 AM »
Nobody have any ideas on this?! I've been researching this for days with no luck, seems like such a simple thing too

brisck1

  • Playmaker Newbie
  • *
  • Posts: 40
Re: UFPS - Action to set a State for Player and Camera
« Reply #2 on: January 15, 2014, 07:36:23 AM »
Ok so after a lot of trial and error and studying code examples of how states are initiated, I found a soloution which I'll post here so that it might save others some agony:



so basically you need to use Call method, with a string for the State name, and then three bools. I have no idea why it needs three bools, most of the code I have studied only had one, but it seems it wont work without them. At the moment im just checking them all TRUE to enable. If anyone can shed some light on what these extra bools do it'd be much appreciated!

brisck1

  • Playmaker Newbie
  • *
  • Posts: 40
Re: UFPS - Action to set a State for Player and Camera
« Reply #3 on: January 15, 2014, 08:17:27 AM »
A little tip for disabling a state: You need to use the call method on Both the Player Controller AND the Camera, otherwise it doesn't work.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: UFPS - Action to set a State for Player and Camera
« Reply #4 on: January 24, 2014, 07:41:28 AM »
Hi,

 Thanks for sharing this,

bye,

 Jean

VivaLaBaz

  • Playmaker Newbie
  • *
  • Posts: 23
Re: UFPS - Action to set a State for Player and Camera
« Reply #5 on: November 18, 2015, 08:33:58 AM »
This works great but I am unable to either disable or set another state after. Im only testing it on the Player Controller for now, I just wanted to test it so I made the arms forward, but when i Call to reset back to default it didn't work, so I made a separate idle state to see if that worked after calling the Forward state and it didnt.

I'm just wondering if there were any other work arounds yet?