playMaker

Author Topic: Using bool variables to manage horizontal movement efficient?  (Read 3437 times)

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Greetings. Theirs this playmaker video demonstrating a object moving left to right.


However I want a object to move up and down before resuming back to moving left to right within limited amount of space. I tried to replicate that type of movement in addition to adding another fsm that pauses it's left&right movement as well as lowering the object down to collide with a button before moving back up again.

Basically I want to make a object operate like a claw machine without moving the gameobject off bounds. Unfortunately it moves away from the whole area because all the itween move add actions do is add new positions making it move farther away.



Would setting up bool actions be logical to solve this problem?


« Last Edit: July 14, 2015, 01:22:44 AM by coffeeANDsoda »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Using bool variables to manage horizontal movement efficient?
« Reply #1 on: July 14, 2015, 10:35:42 AM »
Hi,
i tought i make a quick video to show you how to (i hope this is what you mean) :


coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Using bool variables to manage horizontal movement efficient?
« Reply #2 on: July 14, 2015, 03:43:59 PM »
Hi,
i tought i make a quick video to show you how to (i hope this is what you mean) :


If your video is intended to have a FSM set up to NOT add a new position after it moves back up then yes. Again, this FSM is set up to only move to a certain point, not drift away right?

Unfortunately, I am having a hard time seeing the actions in your example because it only displays at 480p.
« Last Edit: July 14, 2015, 03:47:19 PM by coffeeANDsoda »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Using bool variables to manage horizontal movement efficient?
« Reply #3 on: July 14, 2015, 06:02:51 PM »
Hi,
Here are the actions

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Using bool variables to manage horizontal movement efficient?
« Reply #4 on: July 14, 2015, 06:34:09 PM »
Personally, I'd rather pull something like this off with only one FSM as oppose to breaking it up into two. So thanks. I will do some more experimentation with this set up.

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Using bool variables to manage horizontal movement efficient?
« Reply #5 on: July 14, 2015, 10:16:29 PM »


I don't understand is why Up Left state doesn't do anything on my end. When I set up down and up left in your example it just drags it back up diagonally as oppose to moving straight back up.
« Last Edit: July 14, 2015, 10:19:15 PM by coffeeANDsoda »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Using bool variables to manage horizontal movement efficient?
« Reply #6 on: July 15, 2015, 04:31:52 AM »
Hi,
in "down left" did you setup get position and set vector 3 properly?


i attached the scene so you can check it out, i took out the array stuff so you don't get errors not having those actions in your project.

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Using bool variables to manage horizontal movement efficient?
« Reply #7 on: July 15, 2015, 05:13:43 AM »
Hi,
in "down left" did you setup get position and set vector 3 properly?

Assuming Down Left is for the object moving back up? If your talking about set vector3 XYZ plus the variable the position is higher than Up left. In that case, looking back at it now, I reversed Y parameter and now it doesn't do that anymore.
« Last Edit: July 15, 2015, 05:19:28 AM by coffeeANDsoda »