playMaker

Author Topic: Bool Test Not working  (Read 4511 times)

dicien008

  • Playmaker Newbie
  • *
  • Posts: 8
Bool Test Not working
« on: February 26, 2015, 10:35:34 PM »
Or I'm thinking backwards.  One of the two.  Here is the problem.

I have a custom script that shares a custom bool.  I've written other actions that affect the bool from false to true when certain actions occur.  Then I have Playmaker reaching out and grabbing the value of the bool.  Looking in the inspector the FMS variable turns true at the exact same time my public variable does.  Everything working perfect. 

So then I try to go to the next state when it turns positive using Test Bool.  No matter what I try here, I get nothing.  It refuses to move to the next state.  I've included screen shots.  I'm not sure what I'm doing wrong. 

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Bool Test Not working
« Reply #1 on: February 27, 2015, 12:23:31 AM »
How about screen shots of the value during play?  So show us what the variable is (true or false) as you step  through it.

dicien008

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Bool Test Not working
« Reply #2 on: February 27, 2015, 08:13:59 AM »
Here are the screenshots.  As you can see, PieceScore variable isSelected is synched up to the FSM variable Selected.  Using Bool Test should move to the next state when the variable tests true, however it does not.

invayne

  • Full Member
  • ***
  • Posts: 105
Re: Bool Test Not working
« Reply #3 on: February 27, 2015, 10:16:53 AM »
get your properties and store them in 1 state then make a new state with your bool test make sure the first one has a next frame event. then pull from the 2nd state getting the property and then doing a bool test in the same state might be conflicting try do them in different states  that way so it forces the first  state to go into the bool test state

dicien008

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Bool Test Not working
« Reply #4 on: February 27, 2015, 04:26:06 PM »
Yeah a no go.  Either it hits an infinite loop or it can't access the variable change on update.  I'm just going to script it.  I don't have days more to waste trying to get playmaker to solve it.

c# scripting - 1
Playmaker - 0

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Bool Test Not working
« Reply #5 on: February 27, 2015, 05:16:28 PM »
Turn off Action Sequence.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

dicien008

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Bool Test Not working
« Reply #6 on: February 27, 2015, 06:36:41 PM »
I'm not sure what that means.  What is Action Sequence?  How do I turn it off?  Where do I find it?  It's not in the action browser. Its not in the File System. I don't see it listed in the manual either. A quick Google Search turns up this:

http://hutonggames.com/playmakerforum/index.php?topic=196.0

Sorry I've had this for a week and I'm not familiar with every hidden aspect. 

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Bool Test Not working
« Reply #7 on: February 27, 2015, 07:37:14 PM »
In each state there is a gear icon in the top right and an option to turn it into an action sequence.

This option makes every action completely finish before the next one can begin. Obviously actions running every frame will be a wall stopping the others from running.

You can see the small white lines and down arrows that the style makes. I think that is what is happening here.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

dicien008

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Bool Test Not working
« Reply #8 on: February 27, 2015, 08:02:05 PM »
Ok I see that.  It wasn't on an action sequence.  I tried toggling it on and off.  No real effect.  I don't understand why it won't move.

In programming logic,

if(bool == true) {
    //Do Action
}
else if (bool == false) {
    //Do other action
}

So I was assuming bool test would take the variable and test it.  If it turned true, it would follow the assigned transition to the next state in that very instant.  However, it just doesn't.

I've already coded a go around that does exactly that.

Code: [Select]
#region Selected - used if piece is selected
void GetSelectTrue(){
PieceScore triggers = GetComponent<PieceScore>();
SelectState = triggers.isSelected;
if(SelectState == true) {
CurrentAnimation = Selected;
}
}
#endregion

I'm not sure what the hangup is.  This was supposed to be easier.  I'm not giving up 100% yet, but man this is hard - harder than coding for sure.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Bool Test Not working
« Reply #9 on: February 27, 2015, 08:06:00 PM »
The second screenshot in your first post shows that the state is an action sequence. Are you certain that it has been turned off?

During runtime, the actions that are currently processed are highlighted in bright green as you can see Get Property is, but Bool Test below is grey due to the Action Sequence option.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Bool Test Not working
« Reply #10 on: February 27, 2015, 11:19:29 PM »
"but man this is hard - harder than coding for sure."

Seriously?  Playmaker is 100 times easier than javascript or C#.  that is why people use it.

dicien008

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Bool Test Not working
« Reply #11 on: March 01, 2015, 07:02:12 PM »
Yes.  In this case, it is easier to program it.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Bool Test Not working
« Reply #12 on: March 01, 2015, 07:10:42 PM »
So did you sort this?

It seems clear from your second image that due to the action sequence / Every Frame option that the Bool Test isn't even getting the opportunity to run. Should be easy to just toggle it off and continue working per usual.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D