playMaker

Author Topic: Run State If only  (Read 1348 times)

gearedgeek

  • Playmaker Newbie
  • *
  • Posts: 30
Run State If only
« on: January 02, 2017, 01:17:50 PM »
I'm not sure how to get a state working where the state is only ran if the "correct" gameobject is used.

Example: Player stands by "Mount 1" and presses the use keybind. The state checks to see if "Mount 1" is by the player if it's true then the state runs. If the gameobject is something else then the state doesn't run.

I hope this makes sense. If not I'll come up with a better example.

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Run State If only
« Reply #1 on: January 02, 2017, 02:49:41 PM »
Try the "Game Object Compare" action
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

gearedgeek

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Run State If only
« Reply #2 on: January 02, 2017, 06:18:42 PM »
This is how I have the camera change when the player mounts a rideable gameobject such as Blitz.

https://postimg.org/image/4b33wh6vj/

https://postimg.org/image/gqztq807j/

https://postimg.org/image/fpzl13j7z/

https://postimg.org/image/dmp5tfjf3/

I have two rideable objects in the scene; Mount 1 and Mount 2. When the player mounts and unmounts Mount 1 the camera changing works fine. But when the player mounts Mount 2 the camera changes to Mount 1. Each mount has its own FSM.

FYI: I'm using Third Person Controller from Opsive.