SFDecos.SFLeaf

00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
class SFLeaf extends Projectile;

#exec MESH IMPORT MESH=SFLeaf ANIVFILE=MODELS\SFLeaf_a.3d DATAFILE=MODELS\SFLeaf_d.3d X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=SFLeaf X=0 Y=0 Z=0

#exec MESH SEQUENCE MESH=SFLeaf SEQ=All       STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=SFLeaf SEQ=SFLeaf    STARTFRAME=0 NUMFRAMES=1

#exec MESHMAP NEW   MESHMAP=SFLeaf MESH=SFLeaf
#exec MESHMAP SCALE MESHMAP=SFLeaf X=0.4 Y=0.4 Z=0.8


simulated function PostBeginPlay()
{
	Velocity = 75*VRand();
	Velocity.z = (0.3*FRand() +1.2)*250;
}

auto state Fall
{
	function Tick(float DTime)
	{
		local rotator temp;
		temp = rotation;
		temp.roll += DTime*30000;
		SetRotation(temp);

		if(Velocity.z < -50)
			Velocity.z = -50;
	}

	event Landed( vector HitNormal )
	{
		local rotator temp;
		temp = rotation;
		temp.pitch = rotator(HitNormal).pitch-16384;
		temp.yaw = rotator(HitNormal).yaw-16384;

		SetPhysics(PHYS_None);
//		SetRotation(temp);
		GotoState('Idle');
	}

	function HitWall (vector HitNormal, actor Wall)
	{
		Velocity.x = 0;
		Velocity.y = 0;
	}

}

state Idle
{
	function Tick(float DTime);
	event Landed(vector HitNormal);
}

defaultproperties
{
     Physics=PHYS_Falling
     LifeSpan=15.000000
     Style=STY_Masked
     Skin=Texture'SFDecos.Skins.JSFPlanta1'
     Mesh=LodMesh'SFDecos.SFLeaf'
     bUnlit=True
     MultiSkins(0)=Texture'SFDecos.Skins.JSFPlanta1'
     MultiSkins(1)=Texture'SFDecos.Skins.JSFPlanta1'
     MultiSkins(2)=Texture'SFDecos.Skins.JSFPlanta1'
     MultiSkins(3)=Texture'SFDecos.Skins.JSFPlanta1'
     MultiSkins(4)=Texture'SFDecos.Skins.JSFPlanta1'
     MultiSkins(5)=Texture'SFDecos.Skins.JSFPlanta1'
     MultiSkins(6)=Texture'SFDecos.Skins.JSFPlanta1'
     MultiSkins(7)=Texture'SFDecos.Skins.JSFPlanta1'
     bRotateToDesired=True
}

class file time: 12/7/2003 3:58:26 PM - creation time: 12/7/2003 4:03:45 PM
Created with UnCodeX