playMaker

Author Topic: Loop - Add Float  (Read 1016 times)

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Loop - Add Float
« on: October 08, 2020, 04:17:58 PM »
I'm using an Array Get Next to loop through an array of game objects to get a float on each game object, In the next state I'm using FSM Get Float storing that as Amount, the next action in this state Im using float add to add it to another float variable TotalAmount. The problem is each iteration the TotalAmount just changes instead of adding to it.

Is there a way to get the amount from each object and add it up to a total? Im sure theres a simple way I just cant see it (long day lol).
Have I said how much I love playmaker!!! This is one amazing tool

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Loop - Add Float
« Reply #1 on: October 08, 2020, 04:23:34 PM »
How about creating another variable called Total amount on all those objects and use "fsm float add" instead of get float from those objects and then add float?

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Re: Loop - Add Float
« Reply #2 on: October 08, 2020, 05:15:37 PM »
How about creating another variable called Total amount on all those objects and use "fsm float add" instead of get float from those objects and then add float?

Thank you sooo Much! You sure have changed the way this part of the game works for the BETTER :)

I had no idea that action even existed...
Again thank you!

 
« Last Edit: October 08, 2020, 05:51:52 PM by Kodagames »
Have I said how much I love playmaker!!! This is one amazing tool