TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Blocks that take actors as arguments, can you use maps?
Pages:
1
Blocks that take actors as arguments, can you use maps?
Fool
Posts: 88
August 09, 2016, 07:54:04 pm
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?
rob1221
Posts: 9473
August 09, 2016, 08:01:02 pm
That should work.
https://twitter.com/Rob1221dev
Fool
Posts: 88
August 10, 2016, 09:20:16 pm
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
August 10, 2016, 09:53:02 pm
Can you post a screenshot of what you're doing?
https://twitter.com/Rob1221dev
Fool
Posts: 88
August 11, 2016, 12:09:26 am
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
August 11, 2016, 05:05:08 am
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
August 11, 2016, 09:12:47 am
you shouldn't type the name "data" but insert the attribute. do you have a snippet where you createe it ?
Fool
Posts: 88
September 27, 2016, 07:17:36 pm
Needed an underscore. Shit, thanks Commander.
Pages:
1