PDA

View Full Version : Bobo's FragMents Script


jigu
01-01-2008, 01:30 PM
Hello guys,

I am using bobo's fragments ships to build geometry over fragmented chunks. Now i have two Fragmented boxes with all its chunks named "Mesher" and "CenterFrag" Respectivly. One pflow contains scripted chunks for "Mesher" and one for "CenterFrag" chunks. Now whenever i turn on both scripted pflow setup chunks appear only on just "Mesher" named fragments.

Script for "Mesher" Fragments :

on Init pCont do
(
global ChunksArray = $Mesher* as array
)

and for CenterFrag : I just replaced "Mesher" to "CenterFrag".

But somehow both pflow particles are appearing for "Mesher" Fragments only.

How can i seprate it to appear on other fragments?

I hope my question is clear.

Thanks for helps,
-J.

jigu
01-01-2008, 01:40 PM
I just have searched here. and Problem is solved out from this post (http://forums.cgsociety.org/showpost.php?p=4811110&postcount=9).

Is it because of in bobo's script variable is used as global?
Sorry my maxscript knowledge is very poor.
I just love that script becoz it's easy to do with pflow instead of reactor.

Thanks for those amazing stuff Bobo,
-J.

Bobo
01-01-2008, 02:25 PM
I just have searched here. and Problem is solved out from this post (http://forums.cgsociety.org/showpost.php?p=4811110&postcount=9).

Is it because of in bobo's script variable is used as global?
Sorry my maxscript knowledge is very poor.
I just love that script becoz it's easy to do with pflow instead of reactor.

Thanks for those amazing stuff Bobo,
-J.

Yes, the only way to pass data between the handlers of a Script Operator is to use global variables. It is a Good Idea to give these variables VERY unique names, otherwise you can get "collisions" between multiple scripts trying to use the same variable. The actual name does not matter (as long as it is obvious to you what it contains). You can use your initials or nickname in addition to make sure nobody else in the world would name a variable the same, like JIGU_ChunksArray_Mesher and JIGU_ChunksArray_CenterFrag and so on...

CGTalk Moderation
01-01-2008, 02:25 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.