playMaker

Author Topic: too many Int Switches ?  (Read 742 times)

NinjaX

  • Junior Playmaker
  • **
  • Posts: 98
  • XCO is the ULTIMATE IOS Ninja!!
    • View Profile
    • XCOGAMES
too many Int Switches ?
« on: July 05, 2017, 07:03:23 PM »
Hello :)

May I ask, if you have a character with say 6 FSMS on them and each one has an INT SWITCH that connects to a 100 different states that load different stuff.

Is this going to cause the LOAD times to increase ? I feel like that is the situation that I am in right now, and was wondering if anyone has an idea on how I can get around this ? If there is a better method maybe ?

TY in advance :)
« Last Edit: July 05, 2017, 09:20:49 PM by NinjaX »
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

krmko

  • Beta Group
  • Hero Member
  • *
  • Posts: 828
    • View Profile
    • Fat Pug Studio
Re: too many Int Switches ?
« Reply #1 on: July 05, 2017, 11:53:50 PM »
Can you give us some more details?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3603
    • View Profile
    • jinxtergames
Re: too many Int Switches ?
« Reply #2 on: July 06, 2017, 05:28:24 AM »
Hi,
The load time should be no problem, but maybe there is a better way for your set up using arrays and reduce the states you use drastically.

NinjaX

  • Junior Playmaker
  • **
  • Posts: 98
  • XCO is the ULTIMATE IOS Ninja!!
    • View Profile
    • XCOGAMES
Re: too many Int Switches ?
« Reply #3 on: July 06, 2017, 09:00:33 AM »
So after many testes I believe this is the source of my problem ? I think...

I have on my character 7 FSM each one that has an INT SWITCH with a 100 or so items. So when it loads it tells it what Hair, and cloths and Items and so to apply, fairly simple and straight forward.

BUT I think this is whats causing my long load times. So I need to teach myself how to use array lists now, and maybe this will help ? I dont know until I try. But this is new to me. If anyone is familiar with Arrays and Can help me understand simply how I can maybe convert or use the INT VARIABLES I have with Arrays in order to access things.

So if you know arrays what Im asking for help on (Which ill learn by-myself in time, but who has time these days lol) is:

How do I use an array list with Playmaker to pull up an Item and than place it in the scene ? I think this is easy to do, I dont know.
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

NinjaX

  • Junior Playmaker
  • **
  • Posts: 98
  • XCO is the ULTIMATE IOS Ninja!!
    • View Profile
    • XCOGAMES
Re: too many Int Switches ?
« Reply #4 on: July 06, 2017, 09:45:56 AM »
OK so it turns out that this was really easy to learn lol

Now I need help understanding if there is a way I can use the Array list to send event like an INT SWITCH or maybe create an FSM/state on the character ?
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

NinjaX

  • Junior Playmaker
  • **
  • Posts: 98
  • XCO is the ULTIMATE IOS Ninja!!
    • View Profile
    • XCOGAMES
Re: too many Int Switches ?
« Reply #5 on: July 06, 2017, 10:00:58 AM »
OK so I figured out how to do all these things on my own, turns out Arrays are super easy to use lol.

I shall you keep updated with my new experiment TY again :)
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3603
    • View Profile
    • jinxtergames
Re: too many Int Switches ?
« Reply #6 on: July 06, 2017, 05:45:38 PM »
Hi,
I am happy you got it to work :)

btw you can find many tutorials here

NinjaX

  • Junior Playmaker
  • **
  • Posts: 98
  • XCO is the ULTIMATE IOS Ninja!!
    • View Profile
    • XCOGAMES
Re: too many Int Switches ?
« Reply #7 on: July 07, 2017, 02:37:33 PM »
So my experiments are a little confusing. It may be that using Array is not going to help as much ?

May I ask if anybody knows, IF you have a list of Items in an array attached with your character Does it load ALL of those Items into the Scene ?

Because I have a list of Items and I just need to take one Item from the list. And i have multiple Array lists.

Its for a Customization mode, so people can choose what to wear and than apply it on the character later.

So to recap what I am asking, if anyone knows, does it LOAD all the things on the list ? Or I was using a INT SWITCH does it load everything or just what it needs to do based on the INT ?

Because from these long load times it seems that it loads everything into the scene ?
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

NinjaX

  • Junior Playmaker
  • **
  • Posts: 98
  • XCO is the ULTIMATE IOS Ninja!!
    • View Profile
    • XCOGAMES
Re: too many Int Switches ?
« Reply #8 on: July 07, 2017, 05:42:24 PM »
Hello again lol

I think what I need may Resource.Load and I am messing around with PlayMaker action of it, but am having a hard time grandstanding it ?

In: "Assets Path" do I just type in Resources and create a folder like that in my game because that didnt work lol

Can someone help me understand a little and Ill take it from there :)

(Moments Later)

OK so what you do is just create a "Resources" folder and than place the name of the object you want in Assets Path :D

BUT

Now I am experiencing an Issue where when I do that and than use that to "create and Object" it makes two ? ? And its call it a clone :-O WHY ? lol
« Last Edit: July 07, 2017, 05:52:40 PM by NinjaX »
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3603
    • View Profile
    • jinxtergames
Re: too many Int Switches ?
« Reply #9 on: July 08, 2017, 05:16:39 AM »
Hi,
You probably added a create object after the Resource load. :)

When you use the 'resource load' it is immediately placed in the scene

so instead of using create you need to position it if needed (it will be place on the position that the prefab has)

The name is standard made by unity.
But you can use the 'Set Name' Action to rename the object.

NinjaX

  • Junior Playmaker
  • **
  • Posts: 98
  • XCO is the ULTIMATE IOS Ninja!!
    • View Profile
    • XCOGAMES
Re: too many Int Switches ?
« Reply #10 on: July 09, 2017, 02:55:06 PM »
TY Very much for all your help!
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!