A behavior attribute of type Game Attribute: LIST problem (RESOLVED)

dubealex

  • Posts: 26
Okay, I am currently trying to find a solution for this, maybe the only way is via code blocks, but I'm posting this in case somebody already have a solution:

First of all:
I have no problem when using the game attribute of type list directly, of course. My problem is when I create a behavior attribute of type game attribute, so the user can choose a game attribute he created that is of type list to store the IDs.

The situation:
I need a game attribute to store permanent changes for some actors, values are state ID varying from 1 to 7. So the game attribute is a list. I create a behavior attribute of type Game Attribute. Now, I need to be able to use that behavior attribute in the LIST blocks, but I can't, since stencyl don't see it as a list.

If there would be a "Anything as list" or a "Threat as list" block, all this would be easy.
I tried creating a hidden behavior attribute of type list, and storing the behavior attribute of type game attribute in it, but it is the same problem that stencyl don't see this attribute as a list and I can't make it see it as one.

A solution?:
Any ways to make a behavior attribute of type Game Attribute be seen as a list ?


« Last Edit: July 18, 2011, 05:50:03 pm by dubealex »

Luyren

  • *
  • Posts: 2810
The behavior "Save Status", on Forge, has a code block in the always wrapper to get the "game attribute" type behavior attribute into a list.

The behavior "Inventory", also on Forge, has a custom block that returns anything as a list.

Hope these can be of assistance.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

dubealex

  • Posts: 26
Thanks!, I'll try looking into those

dubealex

  • Posts: 26
Thanks again, it worked. I did a custom behavior to see it as a list.