Add Group field to Behavior Designer Behavior Command

Announcements, support questions, and discussion for the Dialogue System.
User avatar
nathanj
Posts: 298
Joined: Sat May 28, 2016 12:30 am

Re: Add Group field to Behavior Designer Behavior Command

Post by nathanj »

Awesome. Thanks, Tony

And really, no rush on the BD integration update.

That's awesome about the Salsa integration! Just got Dissonance and am going to set up our PUN scene with players and npcs using Salsa 2. So much awesomeness!

Thanks again,
Nathan
User avatar
Tony Li
Posts: 20679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Add Group field to Behavior Designer Behavior Command

Post by Tony Li »

The updated Behavior Designer integration is finally ready. You can download it from the Extras page.

It adds these Lua functions:
  • bdGetBoolGroup(gameObjectName, group, variableName)
  • bdGetFloatGroup(gameObjectName, group, variableName)
  • bdGetIntGroup(gameObjectName, group, variableName)
  • bdGetStringGroup(gameObjectName, group, variableName)
  • bdSetBoolGroup(gameObjectName, group, variableName, value)
  • bdSetFloatGroup(gameObjectName, group, variableName, value)
  • bdSetIntGroup(gameObjectName, group, variableName, value)
  • bdSetStringGroup(gameObjectName, group, variableName, value)
Example:

Code: Select all

-- On behavior tree on "NPC A" with group ID 42, set BD int "Speed" to 7:
bdSetIntGroup("NPC A", 42, "Speed", 7)
And it adds an optional group parameter to the Behavior() sequencer command:

Behavior(subject, start|stop|pause|resume, [group])
  • subject: The name of a GameObject containing a behavior tree, or speaker or listener. The behavior tree can be located on a child object.
  • start|stop|pause|resume: Control action for the behavior tree.
  • group: (Optional) Apply to behavior trees with a specific group ID. If omitted, apply to all behavior trees on subject.
User avatar
nathanj
Posts: 298
Joined: Sat May 28, 2016 12:30 am

Re: Add Group field to Behavior Designer Behavior Command

Post by nathanj »

THANKS TONY!!!!

You are awesome!
User avatar
Tony Li
Posts: 20679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Add Group field to Behavior Designer Behavior Command

Post by Tony Li »

Glad to help. Thanks for the suggestions!
User avatar
nathanj
Posts: 298
Joined: Sat May 28, 2016 12:30 am

Re: Add Group field to Behavior Designer Behavior Command

Post by nathanj »

Hey, Tony

Not to perster you, but I just noticed that the online documenation for the BD integration hasn't been updated.


It's not an issue for me because I know to look here, but for others using BD it might be useful. I think their extremely useful features ;)

Thanks as always

Nathan
User avatar
Tony Li
Posts: 20679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Add Group field to Behavior Designer Behavior Command

Post by Tony Li »

Hi Nathan,

Are you by any chance looking at the old version 1.x manual?

The current Behavior Designer integration documentation is here: https://www.pixelcrushers.com/dialogue_ ... igner.html
User avatar
nathanj
Posts: 298
Joined: Sat May 28, 2016 12:30 am

Re: Add Group field to Behavior Designer Behavior Command

Post by nathanj »

:facepalm:
User avatar
Tony Li
Posts: 20679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Add Group field to Behavior Designer Behavior Command

Post by Tony Li »

No problem. I really would like to redirect the 1.x pages to the current 2.x manual, but believe it or not some games are still using 1.x, mostly ones that have been released but are in support/maintenance mode.
User avatar
nathanj
Posts: 298
Joined: Sat May 28, 2016 12:30 am

Re: Add Group field to Behavior Designer Behavior Command

Post by nathanj »

That's fair enough. I should have know better than thinking you'd missed something ;)
User avatar
nathanj
Posts: 298
Joined: Sat May 28, 2016 12:30 am

Re: Add Group field to Behavior Designer Behavior Command

Post by nathanj »

Hey, I actually have a question now, related to this integration.

Been a while since I used DS and am finally at the point of writing dialogue again. I'm using a Behaviour Designer node to trigger a conversation but for some reason it's not returning success when the conversation is completed. I've had this working before but am drawing a complete blank at the moment.

Can you think of why this would be?

Thanks
Nathan
Post Reply