playMaker

Author Topic: Simon Says with blocks ArrayMaker issue.  (Read 16070 times)

Chizzler

  • Junior Playmaker
  • **
  • Posts: 67
Re: Simon Says with blocks ArrayMaker issue.
« Reply #30 on: February 23, 2016, 05:46:42 PM »
Good to see it's sending the bool to the manager now.. that resolved one issue...  Your bool test in the "Bool Test" state isn't being called every frame. check that box, so it is, and it will work (Or i'm going to bang my head against the wall :P - I can only apologize that this is giving so much trouble).
« Last Edit: February 23, 2016, 05:48:43 PM by Chizzler »

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Simon Says with blocks ArrayMaker issue.
« Reply #31 on: February 23, 2016, 05:49:29 PM »
Checked the box before in the bool test state, problem is the cubes move by themselves. And when they move they end up being under the stone floor and it transitions to game over.


Chizzler

  • Junior Playmaker
  • **
  • Posts: 67
Re: Simon Says with blocks ArrayMaker issue.
« Reply #32 on: February 23, 2016, 06:04:58 PM »
Can you export your scene... you've made changes to my example beyond the fixes i've suggested, and that must be having other effects.

Under my system, the Cube cannot move by themselves.. they are called from the manager, the animation plays, then it returns to the manager. The manager goes to the next one in the pattern and repeats until they've all animated, and the user can begin the process of selecting

 It cannot transition to the fail state until the pattern is complete and the user has clicked the wrong button (it doesn't even begin checking user input until the pattern is finished playing)

I notice on the button FSM, in the state "set fsm bool" you've got a "Send Event" action... This shouldn't be there. it's inactive in the screenshot you sent earlier so I ignored it. If that's been activated, it could be triggering the Key Stroke transition on the manager in the "check user input" state, which you don't want to be doing, hence my confusion at your mention of a Key Stroke global... we don't use one.  that's my only theory as to why it'd be sending you to the fail state prematurely.

In regards to the cubes moving through the floor... yes, they do.. that's because your animating them on the Z axis, and they move through the floor before coming back up above it. I assumed this was what you wanted, as back in your first post, this is how the cubes acted in your Unity Project (Except they don't stop animating). You could move the floor further away, or change the axis the cubes are animating on if this isn't what you want.
« Last Edit: February 23, 2016, 06:09:22 PM by Chizzler »

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Simon Says with blocks ArrayMaker issue.
« Reply #33 on: February 23, 2016, 06:26:26 PM »
Theirs nothing in the cube buttons that has that key stroke event being a global, so it's a local event.

But anyways, should be the right scene.

https://db.tt/oI3urujg

Chizzler

  • Junior Playmaker
  • **
  • Posts: 67
Re: Simon Says with blocks ArrayMaker issue.
« Reply #34 on: February 23, 2016, 06:59:28 PM »
Ok. I'm not sure why your first cube in the pattern is jumping to a new position when the game starts, but here's the actions I took to resolve it:

Manager:
1. Set the "Bool Test" state to every Frame
2. added "Set Bool Value" to False in the "Small Pause" State

Cubes:
1. Added "Get Position" to Start State. Stored to "test position" Vector 3
2. Added "Set Position" (Before the Translate action) to "Translate up Z'd" State. Setting to "test position"

I also changed the Wait actions in the manager and cubes to "Real time".
« Last Edit: February 23, 2016, 07:03:46 PM by Chizzler »

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Simon Says with blocks ArrayMaker issue.
« Reply #35 on: February 23, 2016, 07:12:41 PM »
Manager:
1. Set the "Bool Test" state to every Frame
2. added "Set Bool Value" to False in the "Small Pause" State

With Bool Value unchecked on set bool value?

Cubes:
1. Added "Get Position" to Start State. Stored to "test position" Vector 3
2. Added "Set Position" (Before the Translate action) to "Translate up Z'd" State. Setting to "test position"

Get position at the bottom, and set position doesn't have every frame checked after space is set to world?

Chizzler

  • Junior Playmaker
  • **
  • Posts: 67
Re: Simon Says with blocks ArrayMaker issue.
« Reply #36 on: February 23, 2016, 07:17:25 PM »
Quote
With Bool Value unchecked on set bool value?

yes, Bool value unchecked (False) on the Set bool Action.

Quote
"Get position at the bottom, and set position doesn't have every frame checked after space is set to world?"

We only want to get it's starting position, so we can reset it at the start on the animation... So no. we don't want it getting it each frame.

Likewise, we don't want to set it each frame either, just set it back to it's start location at the beginning of the animation.  Yes set both of those to World Space.
« Last Edit: February 23, 2016, 07:20:35 PM by Chizzler »

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Simon Says with blocks ArrayMaker issue.
« Reply #37 on: February 23, 2016, 07:31:50 PM »

We only want to get it's starting position, so we can reset it at the start on the animation... So no. we don't want it getting it each frame.

Likewise, we don't want to set it each frame either, just set it back to it's start location at the beginning of the animation.  Yes set both of those to World Space.

So get position on the cube doesn't have every frame check?

So far when it comes to bool value, it repeats the animation 4 times in a row before it lets me click on it to win the game. Right now I only have it set to one cube.

Chizzler

  • Junior Playmaker
  • **
  • Posts: 67
Re: Simon Says with blocks ArrayMaker issue.
« Reply #38 on: February 23, 2016, 07:35:05 PM »
Quote
So get position on the cube doesn't have every frame check?

No. it does not have every frame checked.

Yes your variable "Pattern Count" starts at 3. It will repeat until it reaches this variable... but it starts at 0, not 1... so it will repeat 4 times.

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: Simon Says with blocks ArrayMaker issue.
« Reply #39 on: February 23, 2016, 07:42:05 PM »
Yes your variable "Pattern Count" starts at 3. It will repeat until it reaches this variable... but it starts at 0, not 1... so it will repeat 4 times.

Issue I have with it is when I click on it after the manager plays a sequence, when I click a cube, it doesn't play a movement animation, so I the only way I can tell it was clicked is in the inspector on the managers array list proxy when it displays items in it.

Chizzler

  • Junior Playmaker
  • **
  • Posts: 67
Re: Simon Says with blocks ArrayMaker issue.
« Reply #40 on: February 23, 2016, 08:16:46 PM »
=/  I'm sure i'd mentioned that was going to be the case, and it really shouldn't be hard for you to see why, and what you need to do to have the animation play on selection.

There's a state called "remove item from pattern". which transitions to "is pattern complete". instead have it transition to a duplicate copy of the "Show Item", "Bool Test" and "Small Pause states" and link "Small Pause 2" to "is pattern complete".

Now, after this, you're going to come back to me and say "But now i have to wait for the animation to finish playing before I can select the next one". Yes. If you don't want this, you need to remove the Bool Test 2 State you've created, so it doesn't need the animation to finish playing before allowing input.

"But now I can't click the cubes quickly because it's under the floor during it's animation" - Yup.   Seperate the mesh and collider into 2 objects, so you can move the button's mesh, without moving the collider you need to test against.

As you can see, you can keep coming back with more and more issues...  At this point I think it's fair to say your original question has finally been answered!  ;D you've got a working example of how to animate your cubes properly. I don't have the time to guide you through every step of your game development.  Take some time playing around with the system you've got now to try and implement the things you want. The best way to learn is experimentation, not from being given step by step guides.

You'll still find the help you need on these forums, when you run into an issue you can't solve... Just give things a try first =)