Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 |
class TsSubactionPlayEffect extends TsAction; var(Action) class<Engine.Emitter> EffectClass; var(Action) Vector RelativeLocation; var(Action) Rotator RelativeRotation; var(Action) Name AttachmentBone; var(Action) float Duration; var transient Engine.Emitter EffectActor; var transient float elapsed_duration; function bool OnStart() { local Engine.Pawn P; /* local int i; local int size; local float lifetime; local Engine.ParticleEmitter PE; local array<Engine.ParticleEmitter> ARR;*/ EffectActor = Actor.Spawn(EffectClass); if (EffectActor == None) { LOG("TsSubactionPlayEffect, could not spawn effect of class "$EffectClass); return false; } if (AttachmentBone != '') { P = Engine.Pawn(Actor); if (P == None) { Log("TsSubactionPlayEffect, actor requesting bone attachment is not a pawn, "$Actor.Name); return false; } P.AttachToBone(EffectActor, AttachmentBone); } else { EffectActor.SetLocation(Actor.Location); EffectActor.SetBase(Actor); } EffectActor.SetRelativeLocation(RelativeLocation); EffectActor.SetRelativeRotation(RelativeRotation); elapsed_duration = 0; /* if (Duration == 0) { size = EffectActor.Emitters.Length; for (i=0; i<size; i++) { ARR = EffectActor.Emitters; ARR(i).Trigger(); lifetime = PE.LifetimeRange.Max; if (Duration < lifetime) Duration = lifetime; } }*/ return true; } function bool OnTick(float Delta) { elapsed_duration += Delta; if (elapsed_duration >= Duration) { EffectActor.Destroy(); return false; } return true; } function bool CanSetDuration() { return true; } event bool SetDuration(float _Duration) { Duration = _Duration; return true; } event float GetDuration() { return Duration; } function bool IsSubaction() { return true; } defaultproperties { DName ="Play Effect" Track ="Subaction" Help ="Subaction, spawn and attach an effect, and destroy it after the specified duration." UsesDuration =true Duration =0 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |