playMaker

Author Topic: ArrayMaker Tutorials for All! (5th UP!)  (Read 85312 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #75 on: May 26, 2015, 08:22:04 AM »
Jean?
I sent you a private msg. Just wonder if you got it. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #76 on: May 27, 2015, 02:23:45 PM »
Just a fast question!

If I want to have a limit of items I can pick up. For example I can only have 3 keys at a time. And then I need to use one key before I can Pick up another one. What is the best way to do this? I found my own way, but I wonder if it is an action that can check this.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #77 on: May 28, 2015, 02:24:28 AM »
Maybe a singleton manager. Jean made a script for it here in the forums.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #78 on: May 28, 2015, 03:24:39 AM »
Hi,

 singleton manager is meant to prevent a GameObject to be twice in the scene.

 in your case, I think it's more a question of logic, and to enforce your rules, you should create an interface with global events to add, edit delete keys and implement the rules there. for other pick keys, simple make that next key available as a fsm variables for interested fsm to simply use "get fsm string" on that manager and get that key this way.

Then the singleton enters, this manager only need to be once in your scene, and if load additivly levels and this manager also features in these sub levels, a singleton behavior will ensure a clean scene at all time.


 Bye,

 Jean

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #79 on: May 28, 2015, 08:25:12 AM »
Thanks, Jean and sebaslive!

What I did which also work, is to use Arraylist Count and use an Int Compare. When I have picked up the limit of keys, it goes to a new state, but the problem is that, I need to send a Broadcast All Event to all the keys, so it can update the Arraylist Count, since this is in the start state. So everytime I pick up a key, I send this Event.

I don't know if you understand what I mean, but it works. I will continue to experiment with this to see if I can find another way also. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

HyperExc

  • Playmaker Newbie
  • *
  • Posts: 21
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #80 on: May 29, 2015, 09:36:20 AM »
Hey, guys!

I just want to ask, how does one go about in adding prefabs from a project folder into an ArrayList ? I've tried just dragging and dropping them into the slots of the action, but when I hit Play, nothing happens...

Thanks!

p.s. When I use ArrayList Add for a single prefab object it works fine. But when I use ArrayList Add Range and try to add several objects at once...it doesn't work (nothing shows in the index slots in the inspector in playmode, so I assume it doesn't work).
« Last Edit: May 29, 2015, 09:53:04 AM by HyperExc »

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #81 on: May 29, 2015, 02:33:50 PM »
Hi!
I tried it, and it works for me. I use Array List Add Range, added 3 prefab objects in the list. When I run the game. It will add these objects when I press a key.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

HyperExc

  • Playmaker Newbie
  • *
  • Posts: 21
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #82 on: May 29, 2015, 04:22:13 PM »
Hey!

I see...well I guess something is wrong on my end then. Thanks for the heads up!

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #83 on: May 29, 2015, 05:26:33 PM »
Maybe sebaslive or Jean can give you a better answer. I'm very new to Arraymaker :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #84 on: May 30, 2015, 10:48:23 AM »
Maybe Jean is very busy, since i didn't replay my private msg yet. But it doesn't matter. I can write here. :)

This is about Jean's samplepackage for ArrayMaker. I can't get some of them to work. I get I a lot of errors.

The Inventory sample, I get these error when I run the scene:
"The fsmVar value <System.Single> doesn't match the value <System.String>
UnityEngine.Debug:LogError(Object)"

The CardsDeck sample, I get these errors:
"Error Loading Action: UI : FSM : UI : HutongGames.PlayMaker.Actions.GUILayoutBeginArea : screenRect
UnityEngine.Debug:LogError(Object)"

"System.ArgumentOutOfRangeException: ArgRange_Array
Parameter name: index"

This errors, I get in Unity 5. And Unity 4 also.

I need this samples to work, because it will be very useful for me and the games I'm going to make. :)

Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #85 on: May 30, 2015, 02:45:20 PM »
Hi,

 Sorry guys, opening so many messages here and there, it's difficult to keep up :) I have your messages on hold, and want to address them.

 Please bump regularly, DO NOT hesitate!!, in short, the one who shouts the most will get it done... It's not ideal I know :) ... I just need to be refreshed on what's important for you, what can wait, sometimes it's a critical deadline, sometimes it's a project that can be put aside while the issue is solved, I never really know this, so simply bump and bump again.

 Bye,

 Jean

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #86 on: June 03, 2015, 04:30:04 PM »
Hi, Jean!

No problem! :) But I hope you can help me with those errors I get in your ArrayMaker samples soon.

I don't like to shout to much either. Maybe you will be sick of that. ;)
Just hope you will take your time for this soon.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #87 on: June 04, 2015, 02:54:39 AM »
Hi,

 yeah, typically, 1.8 is in very active beta currently, so I expect it to be released soon, and I'll be then making a fresh take at ArrayMaker samples. this is currently problematic cause the sources are using PlayMaker 1.8 beta, and so I can't really bring that back to previous version of PlayMaker...

Bye,

 Jean

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #88 on: June 04, 2015, 03:26:33 AM »
Ok, but I'm using Playmaker 1.7.8.3. So maybe the ArrayMaker samples are not compatible with the current version of Playmaker?
Maybe I should wait for version 1.8 then. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: ArrayMaker Tutorials for All! (4th UP!)
« Reply #89 on: June 04, 2015, 12:09:57 PM »
Hi,

 yep, wait for 1.8, and then I'll be able to leverage all the samples again.

 Bye,

 Jean