Can't get item list!!

guicamarotto

  • Posts: 24
Hi everbody. I'm making my first game in Stencyl, and I don't know every resource or tool yet. Sorry about my english, I'm Brazilian and my english is very weak.

Anyway,

I want to create random actors with list. But list attribute only have number and text item type. I try to add actor type attribute to the list, but when I try to get a item by the id, I get an error saying that I can't get a null object.

Can anyone help me. Thanks.

MarkRosewood

  • Posts: 51
Are you using a game attribute for your list? I have used a normal attribute list  (I mean not a game attribute) and it is possible to add actors to that - there is no limitation about only numbers or text for this type of attribute.

guicamarotto

  • Posts: 24
thanks for answer Mark. No, Im using normal att, but can't get the values. can you or anyone else show me with a printscreen the logic using for set and get itens from a lists, using actor types please.

UPDATE !!

I make it! \o/

I'm using the following logic:

set [actor type attribute] to > get item # > absolut value of > random number between 0 and 3 > from [my list]

« Last Edit: August 23, 2014, 12:56:18 pm by guicamarotto »

MarkRosewood

  • Posts: 51
Excellent! Good luck with the game!  :D

guicamarotto

  • Posts: 24
Thanks! asap I'll up a demo here!!