Untitled
using { /Fortnite.com/Devices } using { /Fortnite.com/Characters } using { /Verse.org/Simulation } using { /UnrealEngine.com/Temporary/Diagnostics } using {/Fortnite.com/Devices/CreativeAnimation} using {/UnrealEngine.com/Temporary/SpatialMath} GRAPH := class<concrete>(): # These pivots will move up or down on the z axis, then rotate towards next pivot. @editable CO2Pivots: [] creative_prop = array{} @editable BIOPivots: [] creative_prop = array{} # These lines will scale towards next pivot. @editable CO2Lines: [] creative_prop = array{} @editable BIOLines: [] creative_prop = array{} @editable GraphCinematics: [] cinematic_sequence_device = array{} var CO2DecadeProgress:[]float = array{400.0} var BIODecadeProgress:[]float = array{-60.0} var InitCO2PivotLocations:[]vector3 = array{} var InitBIOPivotLocations:[]vector3 = array{} Init():void= for (X -> Pivot : CO2Pivots): set InitCO2PivotLocations += array{Pivot.GetTransform().Translation} for (X -> Pivot : BIOPivots): set InitBIOPivotLocations += array{Pivot.GetTransform().Translation} AdjustGraphs():void= for (X -> CO2 : CO2DecadeProgress, Cine := GraphCinematics[X]): Print("Playing Graph Cine: {X}") Cine.Play() spawn. AdjustCO2Graph() spawn. AdjustBIOGraph() AdjustCO2Graph()<suspends>:void= Sleep(0.1) Print("Adjusting CO2 Graph") for (X -> Pivot : CO2Pivots): if: XLoc := InitCO2PivotLocations[X].X YLoc := InitCO2PivotLocations[X].Y ZLoc := InitCO2PivotLocations[X].Z + (CO2DecadeProgress[X] * 0.32) Location := vector3{X:=XLoc, Y:= YLoc, Z:= ZLoc} then: if. Pivot.TeleportTo[Location, IdentityRotation()] Sleep(0.1) Sleep(0.1) for (X -> Data : CO2DecadeProgress, Pivot := CO2Pivots[X], Line := CO2Lines[X]): if: NextPivot := CO2Pivots[X + 1] LookDirection := ( Pivot.GetTransform().Translation - NextPivot.GetTransform().Translation ).MakeUnitVector[] then: Yaw := RadiansToDegrees(ArcTan(LookDirection.Y, LookDirection.X)) Pitch := RadiansToDegrees(ArcTan(LookDirection.Z, Sqrt((LookDirection.X * LookDirection.X) + (LookDirection.Y * LookDirection.Y)))) Roll := 90.0 NewRotation := MakeRotationFromYawPitchRollDegrees(Yaw, Pitch, Roll) if. Pivot.TeleportTo[Pivot.GetTransform().Translation, NewRotation] else: Yaw := 0.0 Pitch := 0.0 Roll := 0.0 NewRotation := MakeRotationFromYawPitchRollDegrees(Yaw, Pitch, Roll) if. Pivot.TeleportTo[Pivot.GetTransform().Translation, NewRotation] if: X < CO2DecadeProgress.Length - 1 Anim := Line.GetAnimationController[] NextPivot := CO2Pivots[X + 1] CurrentScale := Line.GetTransform().Scale CurrentLoc := Pivot.GetTransform().Translation NextLoc := NextPivot.GetTransform().Translation DeltaZ := NextLoc.Z - CurrentLoc.Z AddScale := Sqrt( (32.0 * 32.0) + (DeltaZ * DeltaZ) ) NewScale := vector3{X:=CurrentScale.X, Y:=CurrentScale.Y, Z:= AddScale / 32.5} then: Print("Scale: {NewScale}") AnimMode := animation_mode.OneShot AnimationKeyframes := array{ keyframe_delta{DeltaLocation:=vector3{}, DeltaRotation:=rotation{}, DeltaScale := NewScale, Time:=1.0}} Anim.SetAnimation(Keyframes:=AnimationKeyframes, ?Mode := AnimMode) Anim.Play() Sleep(0.1) else: Print("No Animation Found") AdjustBIOGraph()<suspends>:void= Sleep(0.1) Print("Adjusting BIO Graph") for (X -> Data : BIODecadeProgress, Pivot := BIOPivots[X], Line := BIOLines[X]): if: XLoc := InitBIOPivotLocations[X].X YLoc := InitBIOPivotLocations[X].Y ZLoc := InitBIOPivotLocations[X].Z + (BIODecadeProgress[X] * 1.6) Location := vector3{X:=XLoc, Y:= YLoc, Z:= ZLoc} then: if. Pivot.TeleportTo[Location, IdentityRotation()] Sleep(0.1) Sleep(0.1) for (X -> Pivot : BIOPivots, Line := BIOLines[X]): if: NextPivot := BIOPivots[X + 1] LookDirection := ( Pivot.GetTransform().Translation - NextPivot.GetTransform().Translation ).MakeUnitVector[] then: Yaw := RadiansToDegrees(ArcTan(LookDirection.Y, LookDirection.X)) Pitch := RadiansToDegrees(ArcTan(LookDirection.Z, Sqrt((LookDirection.X * LookDirection.X) + (LookDirection.Y * LookDirection.Y)))) Roll := 90.0 NewRotation := MakeRotationFromYawPitchRollDegrees(Yaw, Pitch, Roll) if. Pivot.TeleportTo[Pivot.GetTransform().Translation, NewRotation] else: Yaw := 0.0 Pitch := 0.0 Roll :=0.0 NewRotation := MakeRotationFromYawPitchRollDegrees(Yaw, Pitch, Roll) if. Pivot.TeleportTo[Pivot.GetTransform().Translation, NewRotation] if: X < CO2DecadeProgress.Length - 1 Anim := Line.GetAnimationController[] NextPivot := BIOPivots[X + 1] CurrentScale := Line.GetTransform().Scale CurrentLoc := Pivot.GetTransform().Translation NextLoc := NextPivot.GetTransform().Translation DeltaZ := NextLoc.Z - CurrentLoc.Z AddScale := Sqrt( (32.0 * 32.0) + (DeltaZ * DeltaZ) ) NewScale := vector3{X:=CurrentScale.X, Y:=CurrentScale.Y, Z:= AddScale / 32.5} then: AnimMode := animation_mode.OneShot AnimationKeyframes := array{ keyframe_delta{DeltaLocation:=vector3{}, DeltaRotation:=rotation{}, DeltaScale := NewScale, Time:=1.0}} Anim.SetAnimation(Keyframes:=AnimationKeyframes, ?Mode := AnimMode) Anim.Play() Sleep(0.1) else: Print("No Animation Found")
Leave a Comment