playMaker

Author Topic: ArrayAdd doesn't seem to complete. [SOLVED]  (Read 1175 times)

neteeyore@comcast.net

  • Playmaker Newbie
  • *
  • Posts: 9
ArrayAdd doesn't seem to complete. [SOLVED]
« on: July 22, 2017, 09:55:12 AM »
I have created a FSM to copy the children of an object into an array.  I am using the GetNextChild Function to process through the list.  At first, I thought it was the GetNextChild Function but to problem solve I put a pause state in to see if the system was getting the object value. 

So my logic is

State: Cards Selected
  Action: GetNextChild (set CurrentCard to Current Child)
  Transition: LoopSelCards --> State: State 1  (Event for each card)
  Transition: Children Stored --> State: Change Scene (Event for All Children processed)

State: State 1  (temporary wait)
  Action: Wait (5 seconds)
  Transition: Finished --> State: Process Child

State: Process Child
  Action: ArrayAdd (CurrentCard)
  Transition: Finished --> State: Cards Selected

State: Change Scene (will eventually change scene, but currently just a dialog)
 Action: SendMessage (used to call my dialog that I create)
 Transition: none.


This logic seems to work well except the last child (card) does not get put in the array.  Because of the pause at "State 1"  I can clearly see the proper child is in the CurrentCard variable, but the ArrayAdd doesn't seem to put it in the array.

I can't figure out why.

« Last Edit: July 22, 2017, 03:17:08 PM by Alex Chouls »

neteeyore@comcast.net

  • Playmaker Newbie
  • *
  • Posts: 9
Re: ArrayAdd doesn't seem to complete.
« Reply #1 on: July 22, 2017, 10:11:12 AM »
Okay, so this was my first silly mistake posted here in the forum.

I solved my problem 1 min after posting this.  (Funny because I worked on it for several hours before posting).

I kept looking at the global array variable and only seeing Element 0 and Element 1 (My array only had 3 so the last one was missing).  I missed the scroll bar next to the elements.  When I scrolled down, magic, there was the value I had spent hours looking for.  Figured I would post this my own answer and save someone else a little time.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: ArrayAdd doesn't seem to complete.
« Reply #2 on: July 22, 2017, 02:47:48 PM »
Hi,
No problem, silly things still happen with me to :D