Motor Sınıfı
Dialog
*Bu içerik, yapay zekâ (beta) kullanılarak çevrildi ve hatalar içerebilir. Sayfayı İngilizce görüntülemek için buraya tıkla.
Özet
Özellikler
Yöntemler
GetCurrentPlayers():Instances |
Olaylar
DialogChoiceSelected(player: Instance,dialogChoice: Instance):RBXScriptSignal |
API Referansı
Özellikler
BehaviorType
Kod Örnekleri
Davranış Türü
local Workspace = game:GetService("Workspace")
local singlePlayerPartSetup = Instance.new("Part")
singlePlayerPartSetup.Name = "SinglePlayerPart"
singlePlayerPartSetup.Parent = Workspace
local multiplePlayersPartSetup = Instance.new("Part")
multiplePlayersPartSetup.Name = "MultiplePlayersPart"
multiplePlayersPartSetup.Parent = Workspace
local singlePlayerDialog = Instance.new("Dialog")
local singlePlayerPart = Workspace.SinglePlayerPart
singlePlayerDialog.BehaviorType = Enum.DialogBehaviorType.SinglePlayer
singlePlayerDialog.InitialPrompt = "Sadece bir kişi benimle etkileşimde bulunabilir."
singlePlayerDialog.Parent = singlePlayerPart
local multiplePlayersDialog = Instance.new("Dialog")
local multiplePlayersPart = Workspace.MultiplePlayersPart
multiplePlayersDialog.BehaviorType = Enum.DialogBehaviorType.MultiplePlayers
multiplePlayersDialog.InitialPrompt = "Herhangi bir sayıda oyuncu benimle etkileşimde bulunabilir."
multiplePlayersDialog.Parent = multiplePlayersPartYöntemler
GetCurrentPlayers
Dialog:GetCurrentPlayers():Instances
Dönüşler
Instances
Kod Örnekleri
Dialog:GetCurrentPlayers
local dialog = script.Parent
local function onChoiceSelected(_player, _choice)
local currentPlayers = dialog:GetCurrentPlayers()
print("Diyalogda mevcut oyuncular:")
for _, player in ipairs(currentPlayers) do
print(player)
end
end
dialog.DialogChoiceSelected:Connect(onChoiceSelected)Olaylar
DialogChoiceSelected