natorior

door_component Scene Graph

Mar 5th, 2026
92
0
Never
9
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | Gaming | 0 0
  1. using { /Verse.org/Native }
  2. using { /Verse.org/SceneGraph }
  3. using { /Verse.org/Simulation }
  4. using { /Verse.org/SpatialMath }
  5. using { /Verse.org/SceneGraph/KeyframedMovement }
  6. using { /Fortnite.com/Devices }
  7.  
  8. BuildDoorPrompt<localizes>(Action:string, DoorType:string):message = "{Action} {DoorType}"
  9. DefaultOpenPrompt<localizes>:message = "Open Door"
  10. DefaultClosePrompt<localizes>:message = "Close Door"
  11.  
  12. door_component := class<final_super>(interactable_component):
  13.  
  14. @editable
  15. DoorType : string = "Door" #Example Options: "Door", "Cabinet", "Cupboard", "Dresser"
  16.  
  17. #The amount you want to rotate the door in degrees.
  18. @editable
  19. RotationAmount : float = 90.0
  20.  
  21. #The speed at which the door opens and closes, in seconds.
  22. @editable
  23. OpenCloseSpeed : float = 0.5
  24.  
  25. #Reverses the side of the door when true.
  26. @editable
  27. DoorSide : logic = false
  28.  
  29. #The default state of the door when the game starts.
  30. @editable
  31. var IsOpen : logic = false
  32.  
  33. #Prevents the door from being interacted with while it's opening or closing.
  34. var IsAnimating : logic = false
  35.  
  36. #Optional sound component reference for playing sounds when the door is interacted with.
  37. var DoorSoundComponent : ?sound_component = false
  38.  
  39. #Promps for interacting with the door, which can be customized based on the door type.
  40. var OpenPrompt : message = DefaultOpenPrompt
  41. var ClosePrompt : message = DefaultClosePrompt
  42.  
  43.  
  44. OnBeginSimulation<override>():void =
  45. (super:)OnBeginSimulation()
  46.  
  47. #Creates the interaction prompts
  48. set OpenPrompt = BuildDoorPrompt("Open", DoorType)
  49. set ClosePrompt = BuildDoorPrompt("Close", DoorType)
  50.  
  51. #sets the sound component if it exists on the entity
  52. if (SoundComp := Entity.GetComponent[sound_component]):
  53. set DoorSoundComponent = option{SoundComp}
  54.  
  55. #When the door is interacted with, it will call the OnDoorInteracted function.
  56. SucceededEvent.Subscribe(OnDoorInteracted)
  57.  
  58. #When the door is interacted with, this function is called.
  59. OnDoorInteracted(Agent:agent):void =
  60. Print("Door interacted")
  61. if (not IsAnimating?):
  62. spawn{PlayAnimation()}
  63.  
  64.  
  65. #Handles the door opening and closing animation, as well as playing sounds if a sound component is attached.
  66. PlayAnimation()<suspends>:void =
  67. if(IsAnimating = false):
  68. set IsAnimating = true
  69. OpenYaw : float =
  70. if (DoorSide = true):
  71. -RotationAmount
  72. else:
  73. RotationAmount
  74.  
  75. var ActualDeltaYaw : float = OpenYaw
  76. if (IsOpen?):
  77. set ActualDeltaYaw = -OpenYaw
  78. set IsOpen = false
  79. else:
  80. set IsOpen = true
  81.  
  82. if (KeyframeComponent := Entity.GetComponent[keyframed_movement_component]):
  83. Keyframe := keyframed_movement_delta{
  84. Transform := transform{
  85. Rotation := MakeRotationFromYawPitchRollDegrees(ActualDeltaYaw, 0.0, 0.0)
  86. Translation := vector3{Left := 0.0, Up := 0.0, Forward := 0.0}
  87. Scale := vector3{Left := 0.0, Up := 0.0, Forward := 0.0}
  88. }
  89. Duration := OpenCloseSpeed
  90. Easing := ease_in_out_cubic_bezier_easing_function{}
  91. }
  92. AllKeyframes : []keyframed_movement_delta = array{Keyframe}
  93. KeyframeComponent.SetKeyframes(AllKeyframes, oneshot_keyframed_movement_playback_mode{})
  94. KeyframeComponent.Play()
  95. if (SoundComp := DoorSoundComponent?):
  96. SoundComp.Play()
  97. KeyframeComponent.FinishedEvent.Await()
  98. set IsAnimating = false
  99.  
  100. #Determines which prompt to show when the player interacts with the door, based on whether the door is currently open or closed.
  101. InteractMessage<override>(Agent:agent)<decides><reads>:message =
  102. if (IsOpen?):
  103. ClosePrompt
  104. else:
  105. OpenPrompt
  106.  
  107. #Additionally, you can call these functions to explicitly open or close the door from other parts of your code, such as triggers or other interactions.
  108. OpenDoor(Agent:agent):void=
  109. if(IsOpen = false):
  110. spawn{PlayAnimation()}
  111.  
  112. CloseDoor():void=
  113. if(IsOpen = true):
  114. spawn{PlayAnimation()}
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Malalki
    18 hours
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=fvhqpfwrxr
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment