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 |
class TsActionAttachToActor extends TsAction; var(Action) MojoActorRef Target; var(Action) Vector RelativeLocation; var(Action) Rotator RelativeRotation; var(Action) Name AttachmentBone; function bool OnStart() { local Engine.Pawn P; Target = ResolveActorRef(Target); if (Target.actor == None) Log("TsActionAttachToActor, Failed to find target actor "$Target.name); // unattach attaching actor Target.actor.SetBase(None); // attach actor to ourselves if (AttachmentBone != '') { P = Engine.Pawn(Actor); if (P == None) { Log("TsActionAttachToActor, actor requesting bone attachment is not a pawn, "$Actor.Name); return false; } P.AttachToBone(Target.Actor, AttachmentBone); } else { Target.Actor.SetLocation(Actor.Location); Target.Actor.SetBase(Actor); } Target.Actor.SetRelativeLocation(RelativeLocation); Target.Actor.SetRelativeRotation(RelativeRotation); return true; } function bool OnTick(float delta) { return false; } defaultproperties { DName ="Attach To Actor" Track ="Effects" Help ="Attach an actor to the owner of a track, i.e. particle systems." } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |