playMaker

Author Topic: ArrayMaker is now available [SEPTEMBER 2018]  (Read 112923 times)

Netjera

  • Playmaker Newbie
  • *
  • Posts: 41
    • View Profile
Re: ArrayMaker is now available
« Reply #45 on: August 17, 2012, 06:30:39 PM »
Hi Jean, thanks again for the help in my other thread!

I'm trying to put together a very simple inventory system, like what you'd see in really old point and click adventures.  Basically, a small panel of ten items.  Items can be picked up in any order, and are assigned the next open slot in the panel.  When the panel is full, the player can't pick up anything else until they've used something.

Would arraymaker help with this?  I've never worked with arrays before, so I'm with Amy in that I really don't understand what they're used for.

Also, what file do I download?  I've read through and it seems there have been a lot of additions but no files added so I'm a bit confused.

Thanks!
« Last Edit: August 19, 2012, 11:06:59 AM by Netjera »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14698
  • Official Playmaker Support
    • View Profile
Re: ArrayMaker is now available
« Reply #46 on: August 20, 2012, 12:14:47 AM »
Hi,

 yes, arrayMaker would help you a lot with this. Also MonoSqlite would also be of a greta help too, and I am currently preparing a bridge for playmaker with advanced editing tools. Basically it will create the necessary actions ( Create, read, update, delete) for you. You simply select the database and table, what fields to use and the tool will generate the actions. It will work with arrayMaker as well.

 that combination is in my opinion mandatory for any inventory system. I don't have enough gaming experience to really understand the requirements, but  I know for sure that you'll need a data management of some sorts.

As for learning what are Arrays, you should simply see them as lists, you can either have a indexed lists, you can get to an item in the list by its index ( give me the third item in that list). you can also have a key baased list ( hashtable), where you would reference each item against a string. So you would query something like "give me the item with key "Player 2"  or something.

I suggest to read documentations on arrayList and Hastables on the net, even if it's for scripting, you will get the basics, and will be able to apply this with playmaker since I have created all the actions necessary, using the same naming conventions as when scripting.

http://www.dotnetperls.com/arraylist
http://www.dotnetperls.com/hashtable

bye,

 Jean

Netjera

  • Playmaker Newbie
  • *
  • Posts: 41
    • View Profile
Re: ArrayMaker is now available
« Reply #47 on: August 20, 2012, 11:00:12 AM »
Wow, that's really helpful!  Thanks a lot, I'll definitely have a look today.

Netjera

  • Playmaker Newbie
  • *
  • Posts: 41
    • View Profile
Re: ArrayMaker is now available
« Reply #48 on: August 30, 2012, 12:10:18 AM »
Is the ability to loop through the array built-in now, or do I still need the script I saw mentioned here?  Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14698
  • Official Playmaker Support
    • View Profile
Re: ArrayMaker is now available
« Reply #49 on: August 30, 2012, 12:47:29 AM »
Hi,

 Yes, you'll need that action:

http://hutonggames.com/playmakerforum/index.php?topic=835.msg6941#msg6941

It's not yet part of the arrayMaker bundle, but simply get it there for now. thanks.

bye,

 Jean

Netjera

  • Playmaker Newbie
  • *
  • Posts: 41
    • View Profile
Re: ArrayMaker is now available
« Reply #50 on: August 30, 2012, 02:03:58 PM »
Hi,

 Yes, you'll need that action:

http://hutonggames.com/playmakerforum/index.php?topic=835.msg6941#msg6941

It's not yet part of the arrayMaker bundle, but simply get it there for now. thanks.

bye,

 Jean

Thanks a lot Jean.  :)

Netjera

  • Playmaker Newbie
  • *
  • Posts: 41
    • View Profile
Re: ArrayMaker is now available
« Reply #51 on: August 30, 2012, 07:31:34 PM »
I've never used a .cs script with Unity before.  How do I get it into the project so that Playmaker/Arraymaker will recognize it?  Thanks!

EDIT:  I figured out how to import it into the project using "Import Assets".  But when I drag it onto my cube object containing the Arraymaker component, it gives me an error, "Can't add script:  Can't add script behavior ArrayListGetNext.  The scripts file name does not match the name of the class defined in the script!"  Can someone tell me what I did wrong, please?
« Last Edit: August 30, 2012, 07:44:37 PM by Netjera »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14698
  • Official Playmaker Support
    • View Profile
Re: ArrayMaker is now available
« Reply #52 on: August 31, 2012, 12:39:46 AM »
Hi,

 This script is used internally by playmaker, it appears listed with the rest of the available actions in the actions browser of playmaker.

 So select an fsm state, and in the action browser search for ArrayListGetNext ( use the search field to get to it directly).

By simply having playmaker action scripts in the assets, playmaker will pick them up, and you can use them like any of the rest of the actions.

bye,

 Jean

Netjera

  • Playmaker Newbie
  • *
  • Posts: 41
    • View Profile
Re: ArrayMaker is now available
« Reply #53 on: August 31, 2012, 01:43:53 AM »
Hi,

 This script is used internally by playmaker, it appears listed with the rest of the available actions in the actions browser of playmaker.

 So select an fsm state, and in the action browser search for ArrayListGetNext ( use the search field to get to it directly).

By simply having playmaker action scripts in the assets, playmaker will pick them up, and you can use them like any of the rest of the actions.

bye,

 Jean

Ugh!  You're right, it was right there in the list the whole time!  lol  Thanks!

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • View Profile
    • Blog
Re: ArrayMaker is now available
« Reply #54 on: September 03, 2012, 03:33:08 PM »
Thanks a lot Jean.The feature is amazing. :D
Bye

amaranth

  • Full Member
  • ***
  • Posts: 172
    • View Profile
Re: ArrayMaker is now available
« Reply #55 on: November 21, 2012, 11:20:01 PM »
Hi Jean, I think I've found a problem with the Array List Index Of action. When I successfully find an index and call the Item Found event, the event pauses for around 5 seconds and then doesn't go anywhere. Item Not Found works fine. I used this with an array of integers. I found a workaround, but I thought you should know if no one else has reported this.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14698
  • Official Playmaker Support
    • View Profile
Re: ArrayMaker is now available
« Reply #56 on: November 22, 2012, 03:34:12 AM »
Hi,

 I just tested, and I don't experience any delay of glitch at all.

 How large if your array?

Are you sure that this is not something else that cause the hang?

if you can send me a repro package, that would be good, or a video.

bye,

 Jean
 

amaranth

  • Full Member
  • ***
  • Posts: 172
    • View Profile
Re: ArrayMaker is now available
« Reply #57 on: November 22, 2012, 02:28:07 PM »
Args! I loaded it this morning and took a look. It was me. I accidentally attached the global event to the send event. Infinite loop ensued.  ::)

pixlweaver

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Re: ArrayMaker is now available
« Reply #58 on: November 29, 2012, 01:53:18 PM »
I've been using Array Maker and it is indeed very handy - thanks Jean!

I did run into one problem so far, however. I am using the Array List Copy To action to attempt a simple copy one ArrayList to another. But action doesn't seem to work. No errors - just an empty destination array list.

Is there a trick to using this action?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14698
  • Official Playmaker Support
    • View Profile
Re: ArrayMaker is now available
« Reply #59 on: November 29, 2012, 02:53:41 PM »
Hi,

 Did you get the latest from the wiki? It was indeed not working on the first few releases, but now it should all be good.

bye,

 Jean