Guest User

Verse Flash Cards

a guest
Jun 19th, 2026
41
0
Never
5
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1.  
  2. using { /Fortnite.com/Devices }
  3. using { /Verse.org/Simulation }
  4. using { /UnrealEngine.com/Temporary/Diagnostics }
  5. using { /Fortnite.com/Devices }
  6. using { /Verse.org/Simulation }
  7. using { /UnrealEngine.com/Temporary/Diagnostics }
  8.  
  9.  
  10. # A creative device that cycles through Thai and English body parts on a HUD message device.
  11. hello_world_device := class(creative_device):
  12.  
  13. # Converts a string into a localizable message required by the HUD device
  14. DisplayMessage<localizes>(S:string): message = "{S}"
  15.  
  16. @editable
  17. MyHUD: hud_message_device = hud_message_device{}
  18.  
  19. @editable
  20. MyButton: button_device = button_device{}
  21.  
  22. # Starts at -1 so the first click increments it to 0
  23. var IndexValue: int = -1
  24.  
  25. # Array containing 50 vocabulary words (indices 0 to 49)
  26. Words: [] string = array {
  27. "หัว"," Head ","หน้า ","Face ","ตา","Eye ",
  28. "หู","Ear","จมูก","Nose","ปาก","Mouth",
  29. "ริมฝีปาก","Lip","ฟัน","Teeth","ลิ้น","Tongue",
  30. "ผม","Hair","คิ้ว","Eyebrow","คอ","Neck",
  31. "ไหล่","Shoulder","แขน","Arm","มือ","Hand",
  32. "นิ้ว","Finger","ข้อศอก","Elbow",
  33. "หน้าอก","Chest","ท้อง","Stomach",
  34. "หลัง","Back","ขา","Leg","เท้า","Foot",
  35. "หัวเข่า","Knee","ข้อเท้า","Ankle","นิ้วเท้า","Toe"
  36. }
  37.  
  38. # Runs when the game begins
  39. OnBegin<override>()<suspends>:void=
  40. MyButton.InteractedWithEvent.Subscribe(DisplayWord)
  41.  
  42. # Handles the button interaction logic
  43. DisplayWord(Agent: agent): void =
  44. # Words.Length is 50, so (Words.Length - 1) evaluates to 49 safely
  45. if (IndexValue < Words.Length - 1):
  46. set IndexValue = IndexValue + 1
  47. if (ThisWord := Words[IndexValue]):
  48. MyHUD.SetText(DisplayMessage(ThisWord))
  49. MyHUD.Show()
  50. else:
  51. # Loop back to the first word (index 0) and display it immediately
  52. set IndexValue = 0
  53. if (ThisWord := Words[IndexValue]):
  54. MyHUD.SetText(DisplayMessage(ThisWord))
  55. MyHUD.Show()
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment