Not finished yet.
I have to sort through the API docs that were made in a pull request, and then I have to publish it. Should be soon enough.
Not finished yet.
I have to sort through the API docs that were made in a pull request, and then I have to publish it. Should be soon enough.
Hi,
I am trying to understand BridgeNet2 and have a question, below is a localscript and am I correct that you would make a Bridge for each call to the client?
Below I have a bridge for playing a sound on the client and a bridge that collects an item and give the player money.
Is this the correct was of doing it or should I combine in one call with an array?
local BridgeNet2 = require(game:GetService(āReplicatedStorageā).Modules.BridgeNet2)
local SoundBridge = BridgeNet2.ReferenceBridge(āSoundBridgeā)
local CollectBridge = BridgeNet2.ReferenceBridge(āCollectBridgeā)
Yes, this is the correct way of creating bridges.
How to use it so like yk i can create 2 bridges for server to server communication.
BridgeNet2.ServerBridge(āName Hereā) doesnt work. Idk if it was meant to work that way
Is it possible to set up BridgeNet to be run in parallel?
whatās your use case for this? Iām not completely opposed to it, but that is fairly complex I think.
No specific use case other than to utilize multi-threading for performance. And because it uses a roblox signal (remote event), I thought it could be possible to setup.
But I imagine it would be really complex, thatās why I was curious if BridgeNet could even support that, or if it would be to different from the core code.
I guess it isnāt worth the hassle.
Is it intentional for connections to bridges on the client to preserve even after the script for them has been deleted? Thatās not the same behavior as receiving remoteevent calls, where it would normally disconnect once the script is gone.
Thereās no realistic way I can replicate this behavior.
I can just defer all the bridge calls until its synchronized again.
Canāt exactly give actual support for it though
Jeez so we got Bridgenet, Fastnet, Red All of these resources are amazing specially for replication systems where packets need to be sent every step.
I love all of these resources I hope bridgenet and the other resources become more used by devs
Does the :InvokeServerAsync()
and OnServerInvoke
functionality work, if so could someone provide an example of it in action. I canāt seem to get it to function.
I typed a 1 instead of an i nvm
CombatMishimaBridge:Connect(function(player, count)
local truecount = count[1]
The following bit worked with BridgeNet1 and let me sort through a nice array, but BridgeNet 2 is erroring out with āattempt to index number with numberā.
Can you explain the proper syntax and way to do this for BridgeNet2?
Is this whatās happening? Every time I reset, I think Iām getting phantom print()'s from the same bridge.
Show what youāre sending through as count.
Local script to send a ācountā of where weāre at in a combo attack.
UIS.InputBegan:Connect(function(input,isTyping)
if isTyping then return
elseif input.UserInputType == Enum.UserInputType.MouseButton1 then
if Debounce == false then
Debounce = true
CurrentTime = tick()
local PassedTime = CurrentTime - PreviousTime
if not Humanoid.Parent:GetAttribute("Stunned", true) then
if PassedTime < 1.2 then
-- Can continue the combo
count = count + 1
if count > 10 then
count = 1
end
else -- Restarts the combo
count = 1
end
else count = 1
end
CombatMishimaBridge:FireServer(count)
end
end
end)
Server script to receive it, below, count[1] worked with BridgeNet1.
CombatMishimaBridge:Connect(function(player, count)
local truecount = count[1]
print(truecount)
Error: Attempt to index number with number (server)
Additionally, I can resolve it by reformatting ācount[1]ā to simply ācountā, but Iām then getting phantom prints with the above script. Iāll get very accurate counts until I reset, and then Iāll still keep getting accurate counts, but Iāll also get the old prints before the reset, which will constantly spam the last number the combo count was left at. Again, not an issue with BridgeNet1, only became an issue when I switched over. I suspect a syntax error. Any clues?
Hey nevermind, solved my own issue. Lots of reading through the documentation.
BridgeNet2 is now officially production-ready. Please let me know if thereās anything I need to hotfix, Iāll be watching closely for the next week or so.