บทความ

กำลังแสดงโพสต์จาก มิถุนายน, 2024
รูปภาพ
Roblox bungee jump ความปลอดภัยต้องมาก่อน สร้างสายบันจี้จั๊มพ์ระหว่างร่วง   สัมผัสประสบการณ์ได้ที่ https://www.roblox.com/th/games/17020178329/unnamed
รูปภาพ
Roblox Studio สร้างระบบ Charge พลังเตะบอล   ขอกำหนดกติกาก่อนน้าาาา แล้วจะเปิดให้เล่นจ้า
รูปภาพ
 Roblox Studio สอนเขียน Script Victory Point สร้างโมเดลที่มีสองเสา Beam แทนผ้าใบ และแอบมีเซนเซอร์อยู่ที่ฐานโดยซ่อนเอาไว้ (Transparent=1) ใต้ SensorPart ใส่ Script ตามนี้ครับ local SensorPart = script.Parent local Beam = SensorPart.Parent.Beam local ParticleEmitter1 = SensorPart.Parent.LeftPart.ParticleEmitter local ParticleEmitter2 = SensorPart.Parent.RightPart.ParticleEmitter local sound = SensorPart:FindFirstChild("Gun Shot") local win = false SensorPart.Touched:Connect(function(otherPart) if win then return end if otherPart.Parent:FindFirstChild("Humanoid") then win = true sound:Play() --เล่นเสียงพลุ Beam:Destroy() --ปลดแผ่นผ้า ParticleEmitter1.Enabled = true --ปล่อยพลุ 1 ParticleEmitter2.Enabled = true --ปล่อยพลุ 2 end end)
สอนสร้าง Slot Machine ด้วย JavaFX วิธีการตั้งค่า pom.xml สำหรับโปรเจ็กต์ Slot Machine ด้วย JavaFX สร้างไฟล์ pom.xml สำหรับโครงการ Maven และใส่การตั้งค่าดังนี้: < project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > < modelVersion > 4.0.0 </ modelVersion > < groupId > com.example </ groupId > < artifactId > slot-machine </ artifactId > < version > 1.0-SNAPSHOT </ version > < properties > < java.version > 17 </ java.version > < javafx.version > 20 </ javafx.version > </ properties > < dependencies > <!-- JavaFX Dependencies --> < dependency > < groupId > org.openjfx </ groupId > <...
การใช้งาน Connect ใน Lua บน Roblox Studio  Connect เป็นคุณสมบัติที่ใช้ในการเชื่อมโยง (bind) ฟังก์ชันที่กำหนดเองเข้ากับ Events ใน Roblox Studio ซึ่งทำให้สามารถดำเนินการโค้ดเมื่อเหตุการณ์เฉพาะเกิดขึ้น เช่น การคลิกปุ่ม การเปลี่ยนแปลงคุณสมบัติ หรือการชนของวัตถุ โครงสร้างการใช้งาน ฟังก์ชันที่เชื่อมต่อกับเหตุการณ์จะต้องใช้คำสั่ง .Event:Connect( function ) ตัวอย่างการใช้งาน 1. การตรวจจับการคลิกปุ่ม local button = script.Parent button.MouseButton1Click:Connect( function () print ( "ปุ่มถูกคลิกแล้ว!" ) end ) ในตัวอย่างนี้ เมื่อผู้เล่นคลิกปุ่ม ระบบจะเรียกฟังก์ชันที่กำหนดและพิมพ์ข้อความใน Output 2. การตรวจจับเมื่อผู้เล่นเข้าร่วมเกม game.Players.PlayerAdded:Connect( function (player) print (player. Name .. " ได้เข้าร่วมเกม" ) end ) เหตุการณ์ PlayerAdded จะถูกเรียกใช้ทุกครั้งที่ผู้เล่นเข้าร่วมเกม พร้อมพิมพ์ชื่อของผู้เล่นใน Output 3. การตรวจจับการเปลี่ยนแปลงของคุณสมบัติ local part = workspace.Part part.Touched:Connect( function (hit) print...