playMaker

Author Topic: Move player from point A to point B  (Read 3978 times)

Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Move player from point A to point B
« on: August 17, 2016, 12:14:35 PM »
I've got second mystery riddle ;-)

I have a player (simple cube) and two planes.
I want to move player from plane 1 do plane 2 after I hit "arrow up" on my keyboard.

I already done:

- Add FSM to player

- First state I called WALK

- It has transition to event: JumpToPlane2

- In WALK state I added action Get key down: "Up arrow" and made send event as JumpToPlane2

- I added second state: GoingToPlane2

- I joined JumpToPlane2 with GoingToPlane2

- In GoingToPlane2 I added actions:
* Move object (Destination: Plane2)
* Controller Simple Move (Target direction is variable called Movement)

And this solution is not working.
Effect is: when use arrow up player move a tiny little and stop for eternity ;-)

Unity and Playmaker are new to me and I want to know this tools for creating simple project, but for now this is like some kind of magic.
If someone can help me I'll be very gratefull.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Move player from point A to point B
« Reply #1 on: August 17, 2016, 12:25:54 PM »
Are you using planes in 3d or what? Have you tried transform actions?
Available for Playmaker work

Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Move player from point A to point B
« Reply #2 on: August 17, 2016, 01:17:48 PM »
Yes, plane was added as a 3D object.

I changed Move Object action to Transform Direction. And after tested it change to Transfor Point.
Both gave results: player are moving!
but:

1. Player move without stoping.
2. Speed depends on the distance to target point. I want to keep constant speed, which is typed in action: Controller Simple Move (Speed)

I think that something was missing in the first solution (goint to another object).

Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Move player from point A to point B
« Reply #3 on: August 17, 2016, 01:23:37 PM »
WoW! I made it!
I used Move Towards action and now my player are moving exactly where and how I want :-)

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Move player from point A to point B
« Reply #4 on: August 17, 2016, 01:49:12 PM »
Great, glad you made it!
Available for Playmaker work

Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Move player from point A to point B
« Reply #5 on: August 18, 2016, 04:26:48 PM »
Unfortunately I could not move smoothly player.
The situation is as follows:

- After hitting up arrow player moves to point A.

- There I set trigger, and when you press the left arrow player moves to point B.

- At this point I also set trigger and when you press the arrow right player moves back to point A.

And here is a problem, because once you return from point B to point A you can't do anything. It looks like the trigger at point A stopped working.
It may lack some event or something else?

Tomasz

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Move player from point A to point B
« Reply #6 on: August 19, 2016, 03:24:19 AM »
I solved another riddle! :-)

Towards Move action must have its own Finish Event, which is connected to a first state thereby making a loop.

Previously, I had made a loop from the event with Move Towards, and here it turned out that we still need additional event back.
Strange, you can see that the logic of the computer is different than mine ;-)