Blocks that take actors as arguments, can you use maps?

Fool

  • Posts: 88
I was experimenting but ran across a few issues that I won't go into. The short version is that I want to use a get map key/value
block as an argument to a custom block that takes an attribute that stores actors.

So does anyone have experience with this, before I go wading in a little deeper? I realize when I click on the block to select and attribute, my map attribute won't show up, but for example, I should be able to drag a get-map-value block into the attribute slot for the custom block.

What say you stenclyrs?


Fool

  • Posts: 88
Thanks rob. I went ahead and looked into it further, but I get class cast errors every time I try to test.

rob1221

  • *
  • Posts: 9473
Can you post a screenshot of what you're doing?

Fool

  • Posts: 88
I narrowed it down, disabling events first, then blocks of code, then individual lines. Basically I have a hashmap that  is used by various events to store data (aptly called 'data') and one of those values is the nearest actor, calculated each tick.
Except, again I keep having class cast errors.

CmdrWhitey13

  • Posts: 505
Make data a map attribute. The variable for calling it sounds like something missing.
For lists, the hardcode iswith an underscore.

Hope it helps.

yoplalala

  • *
  • Posts: 1632
you shouldn't type the name "data" but insert the attribute. do you have a snippet where you createe it ?

Fool

  • Posts: 88
Needed an underscore. Shit, thanks Commander.