[SOLVED] Quick help with Map Attributes

dacaldera

  • Posts: 16
Hey guys (and girls),
Is there a correct way to set a Map attribute from within the dialogue extension? I'm unsuccessfully trying
<setattr [game "dialogue position" "john" "2"]> where "dialogue position" is the name of the map, "john" is the key, and "2" is the value that I would like to set it to.

Thanks
-Daniel



« Last Edit: October 08, 2015, 06:21:32 pm by Justin »

Justin

  • *
  • Posts: 4442
<say <getattr [game "dialogue position"]> set john 2>

should work.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

dacaldera

  • Posts: 16
Ahhh, still not getting it to work. I'll keep trying though.  What is this <say> tag all about?

thanks
-Daniel 

Justin

  • *
  • Posts: 4442
It's used for running code that's not built in to the extension. It transforms the dialog into code like this:

Code: [Select]
<say object function [args]>becomes
Code: [Select]
object.function(args)
So I realize I got the syntax wrong in the last one, maybe this will work.
Code: [Select]
<say <getattr [game "dialogue position"]> set [john 2]>
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

dacaldera

  • Posts: 16
Hey Justin, Thanks.

This syntax works perfectly.

-Daniel