playMaker

Author Topic: Hash Table Get - not finding key  (Read 1403 times)

robbiew

  • Playmaker Newbie
  • *
  • Posts: 3
Hash Table Get - not finding key
« on: May 03, 2017, 03:10:43 PM »
Hello,

Wracking my brain on why this isn't working:

I've got a Hash Table that contains audio objects.
I've got a global variable that contains a key name for one of those audio objects.
But when I do a "Hash Table Get" -- the key is not found (screen attached).

Am I overlooking something obvious here?

Thanks,

R


Deek

  • Full Member
  • ***
  • Posts: 133
Re: Hash Table Get - not finding key
« Reply #1 on: May 03, 2017, 04:40:27 PM »
As you can see in my screenshot it worked for me. Your set-up also doesn't look wrong at all.
So here are some possibilities I can think of: Make sure that...
1. you have the latest version of that script; if you have the ecosystem installed update (/install) the ArrayMaker package
2. the Object type should comes from UnityEngine>AudioClip
3. the Reference and Keys are exactly the same at in the Hash Table Get Action (no spaces or anything else)
4. the Key in that global variable is set before entering the state with the Hash Table Get Action. A work-around would be to create a state with a Wait action before accessing the Get Action with at least 0.1s delay.

Also what are those numbers above your states(the 1 and 0). I've never seen those before.

robbiew

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Hash Table Get - not finding key
« Reply #2 on: May 03, 2017, 07:51:25 PM »
Thanks for that -- after more head-banging, I had to put in some checks to make sure the FSM variable was updating through the loop.

I'm actually not 100% sure why this works, but this *is* now working :)