playMaker

Author Topic: A way to set multiple fsm variables with only 1 action?  (Read 1668 times)

paradiseprime

  • Full Member
  • ***
  • Posts: 105
A way to set multiple fsm variables with only 1 action?
« on: September 14, 2019, 07:14:05 AM »
I am using the Array lists to store the targets hit and then cycle through them to deal damage to each of them. This works well but there is a clear delay when hitting enemies at the same time because it starts to look like a cascading effect instead of all at once.

If there was a way I could get all the game objects in the array and perform a set fsm float on then all at the same time then that would be perfect.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: A way to set multiple fsm variables with only 1 action?
« Reply #1 on: September 17, 2019, 04:10:47 PM »
That's not a Playmaker problem, update runs once per frame, so if you have 60 objects, it will take 1 second per 60fps to iterate through all of fhem. Hence, you have a logical problem. If you have a lot of targets, each one should have a hit detection system so they all get hit simultaneously, or you can try sending a global event to all of them, i guess that's what you're aiming at.
 
Available for Playmaker work

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 150
Re: A way to set multiple fsm variables with only 1 action?
« Reply #2 on: September 17, 2019, 04:40:10 PM »
It sounds like you have a 'next frame' somewhere in the 'Array get next' loop.

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: A way to set multiple fsm variables with only 1 action?
« Reply #3 on: September 18, 2019, 12:21:02 PM »
Yes, normally an array looping action wouldn't wait for the next frame to cycle through the entire array. It definitely looks like you have a delayer somewhere in the loop.