playMaker

Author Topic: Resources Load  (Read 20101 times)

Farwest

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Resources Load
« Reply #45 on: October 04, 2018, 06:23:17 AM »
Hi.
Ok, i think this should work.

I have added a Do Not Spawn, But the default is set to false, else it would break the action for other people.
So you will need to change that on all your resource actions that you wish not to spawn the object.

I did a little bit of testing and it seems to work, but be sure to make a backup when you try (you never know)

You can get it from the attachment below.
Let me know if it works, so i can update the action on the Ecosystem :)

djaydino, you are awesome! Yes it works as intended flawlessly. Thank you so much, you deserve more than mere thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4216
    • View Profile
    • jinxtergames
Re: Resources Load
« Reply #46 on: October 04, 2018, 10:10:59 PM »
Hi.
Just a side note, if you need to spawn many object of the same type you should look into pooling, especially if you see performance issues.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14126
  • Official Playmaker Support
    • View Profile
Re: Resources Load
« Reply #47 on: October 04, 2018, 11:00:16 PM »
Hi,

 Oh, I see now. Sorry I was off on this one.

 Ok, so maybe we should implement something like a new fsmbool in the actual action to enable/disable instantiation?

Can you take care of that Kurt?

 Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4216
    • View Profile
    • jinxtergames
Re: Resources Load
« Reply #48 on: October 05, 2018, 04:20:05 AM »
Hi.
That's exactly what i did :)

So default the action will still do the same and not break if someone would update the action.

I will update on the Ecosystem

Farwest

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Resources Load
« Reply #49 on: October 05, 2018, 05:36:43 AM »
Hi.
Just a side note, if you need to spawn many object of the same type you should look into pooling, especially if you see performance issues.

Thank you, I will check Pooling system.

Actually, I am checking which Enemies Player will going to face, then I procedurally generate and spawn them in a Loop (after the limit of Enemies are reached, loop stops). Loop starts at the start of every battle, therefore I use Resource Load only for the amount of Enemies selected only, in a limited way.

It seems pooling system will be necessary, when I need to duplicate them more in a battle as amount of enemy decrease by battling (I don't duplicate them with Resource Load). Thanks again for the tips.