playMaker

Author Topic: FSM Array Contains  (Read 302 times)

westingtyler

  • Full Member
  • ***
  • Posts: 214
    • View Profile
    • My Oculus Rift + Touch VR Game Using Playmaker
FSM Array Contains
« on: September 02, 2018, 08:48:49 AM »
I'm in an FSM processing game objects and such, and I need to say "if an game object with this same name exists in the Stamp Array or the Map Piece array, then set its material to X material."

The problem is, the Stamp Array and Map Piece Arrays are in another FSM.

The closest I can figure out is to do a "lock and send" where I set that other fsm's "game object to test" to this, set it's Processing bool to true, send the fsm event of checking its array, and wait for it to be done, and retrieve the result from there.

It would be super easy if I could just do a "FSM Array Contains" action to check another fsm's array for containing a thing.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3795
    • View Profile
    • jinxtergames
Re: FSM Array Contains
« Reply #1 on: September 02, 2018, 10:18:10 PM »
Hi.
There is a 'fsm array copy' that you could use.

But i would suggest you to use 'array maker'

It works with a reference and can be easily accessed from any fsm.