PlayMaker Help & Tips > PlayMaker Help

[SOLVED] arrayMaker enable/disable FSM of all gameObjects

(1/2) > >>

Anykey:
Hi  :)

I'd like to know how I could disable or enable a FSM of all the gameObjects of an Array list in arrayMaker

thanks  ;)

jeanfabre:
Hello,

Playmaker has an action for this: https://hutonggames.fogbugz.com/default.asp?W55

Now, to go through each gameObject from an array, you can use the following package and study the distanceSorting scene.

 basically, you create an int variable to you increment and use it to get the element of an array, you work with it, then back to your incrementing state and so on until the int is out of bounds.

If you have problems understand this, let me know and I'll do a working example using your case.

Bye,

 Jean
 

Anykey:
Thanks Jean , I've understood your explaination but actually , I finally found an easier way to do it

Alex Chouls:
Care to share? :)

Anykey:
Actually , I wanted to list all the ennemies spawned and disable all their FSM to "freeze" them while I'm in the shop.

But finally , I chose to make a global bool which is put to true when I open the shop , all the ennemies have a FSM which says that when the bool is true , disable the "Move&Attack" FSM

the way I wanted to do with the list was definitely not of a good use , but eh ! I'm just a programming beginner  :)

Navigation

[0] Message Index

[#] Next page

Go to full version