Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Silly me. Code needed.
Silly me. Code needed.
2004-09-25, 5:04 PM #1
I just need some code that will go through all game surfaces and for those that have a certain material assigned to them will set them as geomode 4 and begin to cylce that mat.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-09-25, 6:10 PM #2
Permanent, or temporary?
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-09-25, 6:18 PM #3
Permanent. It shoudln't really make a difference. :\
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-09-25, 6:40 PM #4
Does, actually. Permanent is always easier than non permanent.

Code:
symbols

material changeMat
flex     animRate
int      numSurfs    local
int      i           local

message startup

end

code

startup:
numSurfs = GetSurfaceCount();
for(i = 0; i < numSurfs; i = i + 1){
    if(GetSurfaceMat(i) == changeMat)
	SetFaceGeoMode(i,0x4);
}

MaterialAnim(changeMat, animRate, 0x1);
Return;

end


The message setup can be changed of course, just cut and paste the symbols into that section, and the other code wherever.

Untested, but should work.
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come

↑ Up to the top!