playMaker

Author Topic: SmartPool released with custom actions  (Read 13919 times)

jay.pis

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: SmartPool released with custom actions[SOLVED]
« Reply #30 on: March 19, 2013, 02:58:47 PM »
I have a multiplayer project that I'm working on and I need to spawn the following: 20 bags with 3 random items spawning inside each bag and spawning random items in selected areas of the map that players can pick-up and use, items do not re-spawn after they are picked up.

Would I need something like SmartPool or not really since I'm not needing to spawn and destroy lots and lots of objects? Can I accomplish this with just playMaker alone?
« Last Edit: April 15, 2013, 09:37:13 PM by jeanfabre »

Lobohotpants

  • Playmaker Newbie
  • *
  • Posts: 38
    • View Profile
Re: SmartPool released with custom actions
« Reply #31 on: March 19, 2013, 06:56:24 PM »
@jean: I had a quick look at PhotonNetworkInstantiate.cs. Shouldn't it be sufficient to copy&paste this into a new script and replace the prefab instantiation with a call to Pool.Spawn() ?

Could you go into a little more detail about this?  I'd be very interested in using it.

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • View Profile
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #32 on: March 20, 2013, 12:41:01 PM »
Another (even better idea) is to use "PhotonViewRpcBroadcastFsmEvent" to send an pM event over the network. You then can spawn/despawn Smartpool like you would locally.

Sonic Punch Studio

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: SmartPool released with custom actions
« Reply #33 on: April 15, 2013, 08:36:46 PM »
Hi there, I've just started integration of SmartPool into my project but I'm kinda running into a snag here. You see, I've followed the instructions and stuff (create game object, attach SP component, linked a prefab) but when the pool preps itself on start up the stored prefabs will show up visible and paused in the middle of the screen (0,0,0).

Am I missing a step here? Is there a way to make it so that the pool will prep out of sight?

EDIT: Finally figured out the problem - had to enter some otherworldly figure in one of the position axis for it to initialise off screen.
« Last Edit: April 15, 2013, 09:35:33 PM by 2ndBrother »
Intense bubble popping action! Get Bubble Virtuoso today!

Trailer: http://www.youtube.com/watch?v=fm31aT8vpPU

Purchase: http://tinyurl.com/buyBVnow

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14059
  • Official Playmaker Support
    • View Profile
Re: SmartPool released with custom actions
« Reply #34 on: April 15, 2013, 09:26:09 PM »
Hi,

 Have you contacted the author of smartPool? it could be likely be a setup of the pool itself or is it something that only happens within the playmaker environment?

bye,

 Jean

Sonic Punch Studio

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: SmartPool released with custom actions
« Reply #35 on: April 15, 2013, 09:36:29 PM »
Hi Jean, just figured out the problem and had edited my original post accordingly. Thanks for the response :D
Intense bubble popping action! Get Bubble Virtuoso today!

Trailer: http://www.youtube.com/watch?v=fm31aT8vpPU

Purchase: http://tinyurl.com/buyBVnow

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • View Profile
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #36 on: April 17, 2013, 01:21:38 PM »
Hi,

sorry for the late answer. This is strange, because Smartpool disables all prefabs when preparing a pool, so all objects should be invisible as a result.

Would you mind to send me more information about this issue, e.g. a way to reproduce this or a ripped down sample project? I'll definitely will look into this asap.

Jake (jake@fluffyunderware.com)
« Last Edit: April 17, 2013, 02:25:03 PM by Jake »

Sonic Punch Studio

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: SmartPool released with custom actions
« Reply #37 on: April 18, 2013, 11:58:23 PM »
Well, if it helps, the thing is I'm using SP on Unity 3.5.6f4 despite the original requirement for Unity 3.5.7f (3.5.7f is preventing me from successfully building android .apk's so I had to roll back with SP still in the project folder).

One way to reproduce this is to just simply link a prefab to a pool and then have it prepare automatically on runtime. In my case I've taken no other steps beyond that.

- 2ndBrother
Intense bubble popping action! Get Bubble Virtuoso today!

Trailer: http://www.youtube.com/watch?v=fm31aT8vpPU

Purchase: http://tinyurl.com/buyBVnow

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • View Profile
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #38 on: April 19, 2013, 08:34:43 AM »
Hi,

SP should work with even older Unity version. I'll try to reproduce this later today and report back.

Thanks

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • View Profile
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #39 on: April 19, 2013, 12:24:56 PM »
Hm, I can't reproduce this. If've tested the sample scenes shipping with SmartPool (Example and pmExample) as well as a pool created from scratch in a new scene, and everything work's like intended: the objects were instantiated but disabled.

Perhaps there is something special with the prefab itself? From here it sounds like your prefabs enable themself somehow. If you start the game, can you please expand the pool object in the Hierarchy window and see if the prefabs are there both disabled and their name ending with "_stock" ?

Thanks
Jake

Sonic Punch Studio

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: SmartPool released with custom actions
« Reply #40 on: April 20, 2013, 03:58:03 AM »
Well that's the thing - the instantiated prefabs are disabled with "_stock" at the end of the names YET they are visible. Normally disabled objects should be not visible but not the case with these pool-instantiated prefabs.

- 2ndBrother
Intense bubble popping action! Get Bubble Virtuoso today!

Trailer: http://www.youtube.com/watch?v=fm31aT8vpPU

Purchase: http://tinyurl.com/buyBVnow

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • View Profile
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #41 on: April 20, 2013, 04:33:04 AM »
Interesting, I've never seen that before and I think it must be a Unity bug. Do this even happens with the example prefabs (or another simple primitive turned into a prefab)? If not, what components are inside the Prefab?

Btw, what are your system specs?

Mayhem

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Re: SmartPool released with custom actions
« Reply #42 on: April 22, 2013, 09:51:16 AM »
Hey there, in the Review-Section of the AssetStore someone wrote that the PlayMaker Example doesn't work. Is that true?

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • View Profile
    • Fluffy Underware
Re: SmartPool released with custom actions
« Reply #43 on: April 23, 2013, 08:12:25 AM »
No, this is wrong! And he should have asked before stating that SmartPool doesn't work with playMaker, just because an example scene was broken by Unity again (because Unity isn't capable of referencing updated scripts, see http://hutonggames.com/playmakerforum/index.php?action=search2).

We'll repackage the example scenes against the latest playMaker version later today. Until then, just drag the scripts manually back in, the settings will remain.

Jake