playMaker

Author Topic: Conditional Expression Action (BETA)  (Read 11294 times)

marv

  • Junior Playmaker
  • **
  • Posts: 50
    • View Profile
Re: Conditional Expression Action (BETA)
« Reply #30 on: February 22, 2017, 04:44:10 AM »
Hi,

thanks for the reply Jean. I just set up a small test FSM (see attachement, ignore the error log, those are unrelated) to show the behavior.

Using a bool variable called "Bool":
a) Bool variable value is true, Expression string is initially empty.

-> it will check correctly once after the expression has been changed from empty to "Bool==false" and return "false". It will then just continue to return "false" in a loop even though the expression has changed to "Bool==true" and it should return "true"

b) Bool variable value is true, initial Expression string is "Bool==true"

-> it will continually return "true" in a loop, even though the start state set the Expression string to "Bool==false" and false should be returned.

Similarly if you set the Expression string in the editor initially to "Bool==true", open the state and click "Refresh" on the action it will return "true". If you then change the value of the string to "Bool==false", go back to the state and click "Refresh" it will show the changed expression but still return "true".

Edit: Bug report submitted (I hope this is something that can be resolved quickly, it's causing me a major headache right now)

cheers

« Last Edit: February 22, 2017, 07:13:07 AM by marv »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11912
  • Official Playmaker Support
    • View Profile
Re: Conditional Expression Action (BETA)
« Reply #31 on: February 28, 2017, 10:53:16 PM »
Hi,

 I have raised the case internally, hopefully this is something feasible.

 Bye,

 Jean

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3171
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Conditional Expression Action (BETA)
« Reply #32 on: March 13, 2017, 11:50:18 AM »
Please try the attached version of the action.
It should recompile the expression if it changes.
« Last Edit: March 15, 2017, 05:22:31 AM by jeanfabre »

marv

  • Junior Playmaker
  • **
  • Posts: 50
    • View Profile
Re: Conditional Expression Action (BETA)
« Reply #33 on: March 14, 2017, 04:53:30 AM »
Heya, thanks for taking a look at this.

I've tried it and got the following compiler error:

Assets/PlayMaker Utils/Wizards/LinkerWizard/Editor/LinkerEditorChecks.cs(17,66): error CS0433: The imported type `PlayMaker.ConditionalExpression.ConditionalExpression' is defined multiple times

Can only be resolved by deleting the ConditionalExpressionAction.cs from this package after which the original one still remains but can't actually be located anywhere in the project. :/

When trying to locate it:
Couldn't find Action Script: PlayMaker.ConditionalExpression.ConditionalExpression
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMakerEditor.ActionScripts:PingAssetByType(Object) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/ActionScripts.cs:123)
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)


I also tried it in another project I set up only a couple of days ago with the same result.

Edit: the "couldn't find action script" error occurs before trying to replace the action as well, btw. so it probably wasn't caused by it but rather is connected to the reason why the replacing doesn't work. (I hope I'm not just being dense here... I'm not a programmer myself, so I'm just fishing :D )
« Last Edit: March 14, 2017, 04:56:53 AM by marv »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11912
  • Official Playmaker Support
    • View Profile
Re: Conditional Expression Action (BETA)
« Reply #34 on: March 14, 2017, 11:59:27 PM »
Hi,

 Yes, this package is not the right one, So it won't install properly.

 I did test on the latest beta and I can confirm that both global variables and expression update are now working, so watch for the next PlayMaker update on the Asset Store, it will be available then.

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11912
  • Official Playmaker Support
    • View Profile
Re: Conditional Expression Action (BETA)
« Reply #35 on: March 15, 2017, 05:23:03 AM »
Hi,

 Can you download it again from the post above, it's now featuring the proper dll.

 Bye,

 Jean

marv

  • Junior Playmaker
  • **
  • Posts: 50
    • View Profile
Re: Conditional Expression Action (BETA)
« Reply #36 on: March 15, 2017, 09:22:18 AM »
Yes, it works now. Thank you guys so much. :)

Alatriste

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Conditional Expression Action (BETA)
« Reply #37 on: May 08, 2017, 08:19:59 AM »
Hi,

 Yes, this package is not the right one, So it won't install properly.

 I did test on the latest beta and I can confirm that both global variables and expression update are now working, so watch for the next PlayMaker update on the Asset Store, it will be available then.

 Bye,

 Jean

How do you call for the global variable? Could you write down an example for the expression, please? :)

krmko

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
    • Fat Pug Studio
Re: Conditional Expression Action (BETA)
« Reply #38 on: May 11, 2017, 03:28:24 AM »
Yeah, that interests me too, didn't download the latest version to check if any instructions are included though.
« Last Edit: May 11, 2017, 03:37:21 AM by krmko »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11912
  • Official Playmaker Support
    • View Profile
Re: Conditional Expression Action (BETA)
« Reply #39 on: May 15, 2017, 02:13:10 AM »
Hi,

 you reference the global variable just as you do for the local variables, it's been fixed, you need to the latest version of PlayMaker.

 Bye,

 Jean

krmko

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
    • Fat Pug Studio
Re: Conditional Expression Action (BETA)
« Reply #40 on: May 15, 2017, 07:25:27 AM »
Awesome  8)