playMaker

Author Topic: [SOLVED] Arraymaker : find value and get its' key  (Read 2146 times)

kiriri

  • Hero Member
  • *****
  • Posts: 506
[SOLVED] Arraymaker : find value and get its' key
« on: May 28, 2012, 07:51:57 AM »
Is there a way to get the key of a value? I want my NPCs to check a hashtable to read out whether the other character is their enemy (by account of a numeric value, like reputation), just like I would in a dictionary. Is this possible or do I have to create multiple lists for each kind of relationships?

EDIT: Or is there maybe a way to get the ID of an object so I can use that as a key and then safely retrieve the saved int value later?

EDITEDIT:
I'll just write a new action to get the ID, then it should work, sorry for bothering you guys :D

EDITEDITEDIT: the real solution is here :   http://hutonggames.com/playmakerforum/index.php?topic=1655.msg7228#msg7228
« Last Edit: May 29, 2012, 03:46:01 AM by Alex Chouls »
Best,
Sven

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [SOLVED] Arraymaker : find value and get its' key
« Reply #1 on: May 29, 2012, 01:44:21 PM »
Hi,

 no problem, I am glad to see that ArrayMaker is being used, so don't hesitate to ask questions!

Bye,

 Jean