Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: kapoke69 on December 13, 2017, 10:17:32 PM

Title: Making pooling issue[SOLVE]
Post by: kapoke69 on December 13, 2017, 10:17:32 PM
i just making pooling system, the problem is after i want to clear obj, i add obj back to pool->inactive object, but when i want to reuse it didn't spawn and new obj instead

the process to reuse are
"check arrAvaiblelength then store value
->int compare (store value vs 0)
->if greater than 0 will get and store obj from arrAvaible
->active obj
but it not spawn as expect, can u find out what should i do, thx in advance!!

ps. now i just accidently solve it, thx all guys.
Title: Re: Making pooling issue
Post by: jeanfabre on December 14, 2017, 01:41:45 AM
Hi,

 likely because you need a different way to check your array. Can you tell me more about how you handle your array of inactive and active object? you should have two array right? one for inactive pooled object waiting to be reinstanciated and one containing only the one instanciated and your pooled object bounced form one array to the other as required.

If you struggle too much with this, let me know early next week, I'll show you how to do this in PlayMaker only.


 Bye,

 Jean
Title: Re: Making pooling issue
Post by: kapoke69 on December 14, 2017, 05:14:09 AM
i want to export file to show but i can't find playmaker.dll , is it ok if i uncheck at "playmaker"folder then export?
Title: Re: Making pooling issue
Post by: Fat Pug Studio on December 14, 2017, 05:38:23 AM
Why would you spawn a new object, can't you disable it and revert it to default variable parameters when spawning again?
Title: Re: Making pooling issue
Post by: kapoke69 on December 14, 2017, 06:19:06 AM
Why would you spawn a new object, can't you disable it and revert it to default variable parameters when spawning again?
im doing that but it doesnt work(guess i do something wrong)  and need help  but  as mention above i can't find playmaker.dll yet :(
Title: Re: Making pooling issue
Post by: Fat Pug Studio on December 14, 2017, 01:20:15 PM
If it's not complicated, you can explain the design to us like this.