


Rama
d = Spawn(class'JoyfulDestruction',,, joyWallManifestor.Location,joyWallManifestor.Rotation);
d.joyfulSetMaterial(Material'JoyfulPackage.DestructionMaterials.Blackrock02_destructionmat', Material'JoyfulPackage.DestructionMaterials.Blackrock02_destructionmat');
//add to array
levelDestruction.addItem(d);
//d.SetCollisionType(COLLIDE_NoCollision);
//d.SetCollision(false,false);
d.StaticDestructibleComponent.SetActorCollision(false, false);
d.StaticDestructibleComponent.SetBlockRigidBody(false);
d.StaticDestructibleComponent.SetNotifyRigidBodyCollision(false);
d.StaticDestructibleComponent.SetRBCollidesWithChannel(RBCC_Default,false);
class JoyfulDestruction extends ApexDestructibleActorSpawnable placeable; //Call this after you have created the Apex Destructible function joyfulSetMaterial(Material outside, Material inside) { if (outside == None || inside == None) { `log("joyfulSetMaterial: sent invalid materials"); return; } StaticDestructibleComponent.SetMaterial(0, outside); StaticDestructibleComponent.SetMaterial(1, inside); } defaultproperties { //thank you Spoof! Begin Object name=DestructibleComponent0 //change to your asset, look up entire path of your APEX by going into UDK //right click on your APEX and get the full name, copy into your code Asset = ApexDestructibleAsset'JoyfulPackage.Destruction.CubeCutOut256' //sets collison/colliding on fracture pieces of Apex mesh //I looked this up in Engine/ActorFactoryApexDestructible.uc //and added "RB" to front of "CollideWithChannels" RBChannel=RBCC_EffectPhysics RBCollideWithChannels={( Default=TRUE, BlockingVolume=TRUE, GameplayPhysics=TRUE, EffectPhysics=TRUE )} End Object }
local JoyfulDestruction d; local Material m; //replace with your material, look up full path in UDK //same way as above for Apex mesh m = Material'JoyfulPackage.DestructionMaterials.Blackrock02_destructionmat'; //be sure to replace the your. with whatever //vectors or Actor you want to use d = Spawn(class'JoyfulDestruction',,, your.Location,your.Rotation); //change second m to something else to have different inside //fracture material d.joyfulSetMaterial(m, m); //yay! //debug info `log("apex mesh created and materials set");
Leave a comment: