playMaker

Author Topic: Help me improve this- A compelx state machine with Loop in another loop.  (Read 946 times)

PET

  • Full Member
  • ***
  • Posts: 137
    • View Profile
    • GamerPET
Hello guys!

Who wants to help me improve this. I'm using some logic stuff... and I want to optimize this and see how can I do this better.

I don't like to do stuff like this in playmaker because of some reasons below... and I want to see if maybe I'm doing something wrong and maybe There is a better way.



I have this thing of beauty. This is what I'm trying to do:

1. I have some Game Objects that have an Array Maker. Something like this:


2. Some GOs only have a list of 1. Some can have a list of multiple HTTP links (as seen in the above screenshot).

3. Those links link to an .mp4 file.

4. My goal is to check if the link is in 1 part, or multiple parts.

5. So basically I LOOP trough the GAME OBJECTS checking if their Array Maker List is SOLO or Multiple Parts.

6. If it's SOLO, I just take the link, extract the name of the File, then I...

7. Check if the file EXISTS on the SD card or on the App Folder.

8. Dependign on the restult, I show a PLAY button or a DOWNLOAD button.

9. If the file has Multiple Parts, I loop trough all the parts, checking each part if it exists on the SD card or on the App Folder. If any part is missing I imediatly show the Download Button, if not, I check trough all of them and if all of them EXISTS, I just show the Play Button.


What I find annoying is that I have to create multiple variables that are just temporary. This is basically gloging my State Machine.


Those are the Variables I currently use. Sometimes I don't even don't know how to name them. Since Playmaker is not flow based, I can't pull the info of the variable from one Node to Another, I need to store it into a variable, so the next State can use it.

At least that's how I understand that Playmaker works. And here is one of my questions. Did I understdood right? Is there an easyerway or I'm overcomplicating myself?

Another problem is that on my first LOOP, some of the Variables I use, remain "Set Up", so when the next Loop comes, those Variables are already set, so my checkup Fails.

I think I have to make a state before my Loop, where I "set those variables back to null".

Do you know an easyer way to do this?


Thank You
Technical Game Designer
www.GamerPET.com

jasperPT

  • Full Member
  • ***
  • Posts: 109
  • I am a VFX Animator teaching myself to make games
    • View Profile
I might take a look at this a little later, I do a few things similarly in my project.

With regards to taking information without storing it in a variable. If you dont want to clam up your fsm with odd named variables, have you thought of using "set event properties" and "get event properties"?

Loops in loops in loops start to get confusing very quickly.

PET

  • Full Member
  • ***
  • Posts: 137
    • View Profile
    • GamerPET
Any documentation on Set & Get Event Properties?
Technical Game Designer
www.GamerPET.com