Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: coffeeANDsoda on February 17, 2016, 03:19:09 PM

Title: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 17, 2016, 03:19:09 PM
For awhile, I have been attempting to rework sebaslive's SimonSays ArrayMaker example project to use moving cubes instead of switching materials on each of cube.

http://hutonggames.com/playmakerforum/index.php?topic=9800.0 (http://hutonggames.com/playmakerforum/index.php?topic=9800.0)

This is what I have so far. Click the cubes, press space bar to restart the game.

https://db.tt/yIsm0Ep3

Doesn't seem to work like the original example. Here's what I have for all three cubes for the FSMs.

https://db.tt/8X51M33U

https://db.tt/dVvdDVIQ

https://db.tt/ZfiuBpUW

I thought by using some sort of position & ease float method with the same global transitions and system events that it would work flawlessly.

Why do the cubes act this way?

Thanks.




 
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 18, 2016, 01:46:34 AM
Bump.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 18, 2016, 10:15:52 AM
I couldn't work out what you were trying to accomplish based on your example and FSM's... your Cubes are caught in independent loops so won't stop animating regardless of player input. Additionally, your start state is using Get position each frame, when i suspect you want set postition (The ease float is doing nothing in this state as the float value is being reset by the position each frame). The other states are setting the cubes position at the top end of the ease float value before it starts easing back down to 0. this is why they appear to jump down moving back up slowly (i.e. you've set the float to go from 2 to 0 or 1 to 0 - If you set one to go from 0 to 2, you should have a smooth up and down animation).

Remember that you want the animation to play once, when called too from an external place. For this you use Global events (Such as your mouse down) sent to that specific object FSM. You then fire an event back to the external place saying the animation is complete. You don't want a closed loop using normal event transitions (what you've named your transition events suggests you've got confused between local and global events)

 I whipped up a quick Scene with a very basic Simon Says game using movement instead of colours for you. I've gone about it very differently to you, with everything handled by a Manager. Going into a full breakdown of it here could get lengthy.

Be sure to play around and ask if anything confuses you.


P.S.   this is the first time i've exported a scene, i'm just assuming it'll work ;)


Edit:  AssetPackage Removed
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 18, 2016, 02:57:12 PM
Remember that you want the animation to play once, when called too from an external place. For this you use Global events (Such as your mouse down) sent to that specific object FSM. You then fire an event back to the external place saying the animation is complete. You don't want a closed loop using normal event transitions (what you've named your transition events suggests you've got confused between local and global events)

Last I checked, Mouse Down is the same System Event Global found in the sebaslive project I base the FSM's structure on. Since theirs a state named "Show Item" that includes three "Send Event By Name" actions relying on Mouse Down for example.

Show item state can be seen at 1:49 on sebaslive tutorial video in the URL below.



Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 18, 2016, 03:11:56 PM
Currently you have a loop without any breakpoint. Whether the global mouse exit* event is fired or not, your object is progressing to that state from it's previous one. If the event is fired, it'll jump to that state from whichever state is was currently in, and it will continue from there... but nowhere does your loop stop to wait for that input it will keep repeating itself indefinitely.

The way the cubes are animating is a seperate issue, which looks to be caused by your float ease action starting at 1 or above in each state. if one state eases your float from 1 to 0,  your next one should ease it from 0 to 1, for a smooth animation, rather than it's current teleporting below your visible plane.

Edit: Sorry, just checked your screenshot again... your global event is Mouse Exit, not mouse Up/Down   those are local events.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 18, 2016, 03:45:29 PM
Currently you have a loop without any breakpoint. Whether the global mouse exit* event is fired or not, your object is progressing to that state from it's previous one. If the event is fired, it'll jump to that state from whichever state is was currently in, and it will continue from there... but nowhere does your loop stop to wait for that input it will keep repeating itself indefinitely.

In terms of ease floats, would you say set position on the set new pos state is not needed and it could be replaced with a add next frame event action if the move down state had 0 on the From Value parameter in that action located on the start state?

I was wondering if that would be a better alternative than to use move towards or itween actions? I thought about making a script for this issue, but I don't understand how that would work in relation to that custom created c# cube script communicating the FSMs(like the simonsays manager) and how transforming the cubes position would work.

Sounds like a mouth full, but that's a idea I had floating around in my head yesterday.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 18, 2016, 04:09:37 PM
For such a simple movement, I'd go with a "translate" action, though there's no right/wrong way to move something. I think your method of easing on the float value is fine, but you just need to reverse the values on one of your states to get a smooth animation rather than the teleporting that occurs.

 When you enter "set new pos" state at the moment, your float value is 0. (Unless your stuck in the start state because the get position updates your float value every frame, and it's never reaching 0). So skipping it if the float is 0, is the same as not having the state exist at all... you should never even enter that state if your float value isn't 0.

Start State:
Find game object (manager object)
*Does not connect to any state*

State 1 - Accessed through Global event from manager:
Translate (2 along Z axis per second, each frame)
Wait (1. Finish Event = Finish)
*Moves to state 2*

State 2:
Translate -2 along Z axis per second, each frame)
Wait 1. Finish Event = Finish)
*Moves to state 3*

State 3:
Set FSM bool (on Manager, so it knows animation is finished.)

*AssetPackage Removed*
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 18, 2016, 11:34:08 PM
And on your end you can click on more than 1 cube at a time to mimic a sequence pattern?
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 19, 2016, 12:30:43 AM
Well, currently, the cube doesn't play an animation when you click on it, so the check against the correct pattern is almost instant...

Using the Translate action alone would be a problem if you wanted to have the animation play when you select a cube and didn't force the player to wait for it's completion. It's likely to drift, because there's nothing forcing it back to it's original position.

Instead, In the start state on the Cube, add a "Get Position" action and store that vector. When the animation starts ("Move up" state) , "Set the position" before doing your Translate action.

On the manager, Send an event to the cube to play it's animation (Like it does in the first loop) when clicked but don't do the bool test to see if the animation is finished. This results in the player being able to click before the animation completes (So can quickly copy the sequence, the checks will still take place almost instantly) and the animation will simply start from the beginning each time it's clicked.

*Extra*
Doing this, you'd also want to remove the colliders from your cubes, and have each cube have an invisible collider as a parent, which doesn't move with the cube mesh. Not only is this more optimized, but you don't have to click onto a moving cube to continue your sequence.

If your referring to a multi-touch system (2 cubes firing off simultaneously as part of the pattern) then that is more complicated, you'd need to look at having multiple arrays describing the sequence "Touch 1 array" "Touch 2 array" as well as acceptable time delays between presses. It's not basic stuff. Once you become more familiar with the underlying logic, you'll be able to piece together how to implement something like that, but it's not something one could easily guide you through in a forum post.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 19, 2016, 02:26:19 PM
If your referring to a multi-touch system (2 cubes firing off simultaneously as part of the pattern) then that is more complicated, you'd need to look at having multiple arrays describing the sequence "Touch 1 array" "Touch 2 array" as well as acceptable time delays between presses. It's not basic stuff. Once you become more familiar with the underlying logic, you'll be able to piece together how to implement something like that, but it's not something one could easily guide you through in a forum post.

I'm only attempting to make a cube moving version of sebaslive simonsays example.  So it also includes three scripts. Event System, Standalone Input Module, and Touch Input Module. That can be found in the link I posted above for his arraymaker thread, so you can get an idea of where I am basing it off of.

So to be clear besides the needed scripts like in a example project, I only want to do a non-multitouch input type of game just like his(Sebaslive) scene. So you click one cube at a time after it moves up. Again, it only lets me click one cube once, not the second cube once after I click on the first cube.

Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 19, 2016, 05:16:37 PM
On my end, my scene runs perfectly.  it shows a pattern, checks user input against that pattern. No problems with clicking cubes, i don't know what's happening for you there.

So, my final approach... I downloaded the example scene you were working from and made the changes you want (as far as I can tell).  It works perfectly on my end, if it doesn't work properly on your end, then maybe i'm doing something wrong with the export process.
If this doesn't work, I give up, I'm no expert at playmaker or teaching, maybe you'll have more luck from someone else helping you  :)

Any State I have changed is highlighted in Orange.

https://onedrive.live.com/redir?resid=CE23FC8B3621CDCC!537&authkey=!AE2bCgoWhU_AggM&ithint=file%2cunitypackage (https://onedrive.live.com/redir?resid=CE23FC8B3621CDCC!537&authkey=!AE2bCgoWhU_AggM&ithint=file%2cunitypackage)
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 19, 2016, 10:45:01 PM
On my end, my scene runs perfectly.  it shows a pattern, checks user input against that pattern. No problems with clicking cubes, i don't know what's happening for you there.

Even after you click it once in order for the manager to create another randomly generated pattern? If it was with keys on a keyboard though, I don't see any premade playmaker system event globals for input keys, to reduce the amount of time laying out button actions when a cube moves.

Plus, what would that mean for coding when it comes to input, I was curious because I don't see coding tutorials on youtube regarding unity3d simon says gameplay? Or do you develop games only with playmaker?
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 19, 2016, 11:15:11 PM

Even after you click it once in order for the manager to create another randomly generated pattern?

Yeah, it works fine for me, there's a short delay before it'll generate a new pattern, 2 seconds or so. I'm not sure why it wasn't working properly for you... is the latest AssetPackage better? It's purely a modification of the Example provided with the tutorial you watched

If it was with keys on a keyboard though, I don't see any premade playmaker system event globals for input keys, to reduce the amount of time laying out button actions when a cube moves.

You can have a state checking for the key input, and when one occurs send off a global event to the required object.

Plus, what would that mean for coding when it comes to input, I was curious because I don't see coding tutorials on youtube regarding unity3d simon says gameplay? Or do you develop games only with playmaker?

Playmaker can talk to external scripts and vice-versa. There's information on how this works in the Playmaker Manual

EDIT: If it isn't working on yours... it could be the global event isn't being exported with the scene... I did say I was new to the exporting process =/ Sorry. Simple enough to fix on your end. Look for the "Send Event Action" in the "Show item" State. Give it an event from your global event list. Next, Go to your template (click on a cube in the heirarchy list and you'll get the option to edit the template in the FSM window) and add "global transition" to the "Start Move" State.
https://imgur.com/qsKSgLI (https://imgur.com/qsKSgLI)
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 20, 2016, 02:41:01 PM

Playmaker can talk to external scripts and vice-versa. There's information on how this works in the Playmaker Manual

Do you know what category or page it is on in the Manual? Don't understand where exactly the page is in regards to custom coded c# scripts communicating with other actions.

Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 20, 2016, 03:01:43 PM
https://hutonggames.fogbugz.com/default.asp?W329 (https://hutonggames.fogbugz.com/default.asp?W329)
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 20, 2016, 03:31:25 PM
https://hutonggames.fogbugz.com/default.asp?W329 (https://hutonggames.fogbugz.com/default.asp?W329)

Seems like a pretty basic example, and that is strictly for scripts you write as oppose to turning scripts into custom playmaker actions right? I'm brainstorming about how I could add things effectively for a game, and I was thinking of ways to add things to simon says scene. For example, ways how to grab objects properly like in this example project video.

http://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/creating-a-jewel-miner-game

Don't know whether or not this is overkill but it's a idea I had.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 20, 2016, 04:59:51 PM
Check the API reference in the Manual and the final tutorial in HutongGames youtube playlist.  I've not done any coding, preferring to work in playmaker where possible (and third party assets with playmaker support), so I can't help you here.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 20, 2016, 09:17:11 PM
So, my final approach... I downloaded the example scene you were working from and made the changes you want (as far as I can tell).  It works perfectly on my end, if it doesn't work properly on your end, then maybe i'm doing something wrong with the export process.

Any State I have changed is highlighted in Orange.

Code: [Select]
SebasController : Sebas Says Controller : Show item : SetFsmGameObject : Could not find variable: go_Cube
UnityEngine.Debug:LogWarning(Object)

Is that why it that console message shows up when send event in the show item stage that is orange doesn't have a send event? It has a Event Target and gameobject variable set up to buttonObj_go.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 20, 2016, 10:23:28 PM

Code: [Select]
SebasController : Sebas Says Controller : Show item : SetFsmGameObject : Could not find variable: go_Cube
UnityEngine.Debug:LogWarning(Object)

Is that why it that console message shows up when send event in the show item stage that is orange doesn't have a send event? It has a Event Target and gameobject variable set up to buttonObj_go.

No. That shouldn't be appearing and it certainly shouldn't stop the scene from rinning, but you can go ahead and delete that action (Set FSM Game Object) on the "Show Item" state, and it won't affect anything but will clear the error, that variable isn't called anywhere, I just forgot to remove it.

The important thing is that the Send Event Action in the "Show Item" state, has an event selected, then set up the template fsm like this using a global transition:
https://imgur.com/qsKSgLI (https://imgur.com/qsKSgLI)

I called the global event "Activate" but you can call it whatever you like.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 23, 2016, 02:30:47 PM
The important thing is that the Send Event Action in the "Show Item" state, has an event selected, then set up the template fsm like this using a global transition:
https://imgur.com/qsKSgLI (https://imgur.com/qsKSgLI)

I called the global event "Activate" but you can call it whatever you like.

And it is necessary to make each cube's FSM a template? The manager stays on Bool Test State with the action. I thought it was odd, because I thought it would transition into the small pause state before it goes to watch user input.

Don't really understand why it doesn't want to communicate with activate global.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 23, 2016, 03:15:17 PM
It's not necessary to use a template to control the cubes, this is how it was setup in the example before I made the modifications, so I didn't change it. I've actually got very little experience with Templates, so took me a few mins to get my head round the setup... but it does make sense, as all the cubes work in the same way... you get the same result if instead of using a template, you use 4 duplicate FSM's. One on each cube.

Have you got it working now?

1. On the Template, create an Event in the "Events" tab.  Name it Activate, and make sure the checkbox is ticked.

2. Right Click on the "Begin Move" State, and "Add Global transition" called "Activate"

3. In SebasController, on the "Show Item" state, select "Send Event" action, and it asks for an event to send. Set this as "Activate".

I really can't explain it any better than that =/
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 23, 2016, 03:51:47 PM
For the record, I have experimented with making templates, but they didn't work well.

Have you got it working now?

In send event located in Show Item, I did set it to your modified SebasController example(SimonFinal Scene including scene "Arraylist_03" ), if you mean setting event target to Game Obj FSM, with the buttonObj_Go variable, with the buttons name FSM default name, and Send Event set to a Activate Global Transition (Activate Event is enabled on the checkbox of the button, so it is a Global).

The last state on the button cube with a Set Fsm Bool has a empty local variable that is set to game object right? Empty as well?

I thought I could name the simon says manager a name besides "FSM", therefore I made the manager look like sebazsays a different FSM name. And a bool that is set to false on its Bool Value, and that is local as well. 
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 23, 2016, 04:07:19 PM

The last state on the button cube with a Set Fsm Bool has a empty local variable that is set to game object right? Empty as well?

No. That should have imported fine =S

That action should be as follows:

Game Object = go_Manager
FSM Name = Sebas Says Controller
Variable Name = Finished
Set Value = True

This is the action that tells the Manager that the animation has finished playing.

go_Manager is a local variable, from the "Setup" state, which finds the "SebasController" Object and stores it.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 23, 2016, 04:27:14 PM

No. That should have imported fine =S

That action should be as follows:

Game Object = go_Manager
FSM Name = Sebas Says Controller
Variable Name = Finished
Set Value = True

Bare in mind, I recreated the manager with the original sebas disabled as well as template colorbuttons.

I think this is weird though, mouse pick action is suppose to communicate with the buttons and Set Fsm Bool on the button is suppose to my simon says FSM bool. After all the bool located in the manager is set to false and Set Value has the box checked in order to make it a true value right?
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 23, 2016, 04:35:36 PM
The FSM's on the buttons just control the animation, everything else is controlled in the manager.

In my example, we're not playing the animation of the cube we select, so no, the mouse pick does not interact with the buttons FSM. It just fires a raycast and tests what it hit against the correct button in the pattern.

Yes, the Set FSM Bool on the cubes sets the bool variable to true in the manager, so it can pass the bool test after playing the animation. We then set the bool back to false (In the "Iterate" state) and start over till the pattern is finished playing.

Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 23, 2016, 04:38:58 PM
I still get this though. In terms of what the manager does and the button for reference.

https://db.tt/oF9DXpT9

https://db.tt/ceke4YHc

https://db.tt/p82qxOXb

https://db.tt/mWQrkop8

Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 23, 2016, 04:52:46 PM
You've changed the name of the Manager Game Object.  You need to go into the Start state on the button FSM and update the "Find Game Object" action to find the object with this name.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 23, 2016, 05:11:07 PM
You've changed the name of the Manager Game Object.  You need to go into the Start state on the button FSM and update the "Find Game Object" action to find the object with this name.

Still the same results. What would that mean for KEY STROKE being a global. Makes me thinking because it isn't included in the button.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler on February 23, 2016, 05:23:39 PM
We're not using "Key Stroke" as a Global anywhere. we're using it as a local transition in the manager (Although there is probably no need too, it's left unchanged from Sebas's example - I changed as little as possible as you're familiar with his from the tutorial video).

When you hit play, head into your variables tab of your Button FSM. does "Test simon says manager" have a game object attached? If it's None. then you've misspelt it in the "Find Game Object" action OR you've applied a tag to it, and are not filtering it in the  "Find Game Object" action.

However, we can actually skip this action entirely if we wanted, and instead drag the "simon says" object from the hierarchy panel into the "Test simon says manager" variable on the buttons, making sure to remove the "Find Game Object" action.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda on February 23, 2016, 05:38:34 PM
When you hit play, head into your variables tab of your Button FSM. does "Test simon says manager" have a game object attached? If it's None. then you've misspelt it in the "Find Game Object" action OR you've applied a tag to it, and are not filtering it in the  "Find Game Object" action.

Simon says manager is untagged. Checked the name of the managers FSM and the buttons Test simon says manager variable. In runtime for the simon says manager, it does say that Bool Finished bool is true, but it doesn't transition into small pause even if it's set to do so with the DONE! event. I brought up KEY STROKE BEING A GLOBAL regarding mouse button input.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler 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).
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda 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.

Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler 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.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda 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
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler 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".
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda 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?
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler 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.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda 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.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler 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.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: coffeeANDsoda 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.
Title: Re: Simon Says with blocks ArrayMaker issue.
Post by: Chizzler 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 =)