I find lock very restrictive. Is there some way of hooking up a condition to choose if the lock is active rather than having to go through another node?
edit: I just went ahead and put it in. I’m calling it CommandLock/ConditionalLock
First, amend RunCommands to exclude CommandLock like so
if InputNode:GetAttribute("Type") ~= "CommandLock" and ...
Next, put this at the top of IsLocked, above the stuff for the regular locks.
local CommandLockNode = FindNodeType(GetInputNodes(Node),"CommandLock")
if CommandLockNode then
local moduleScript = CommandLockNode:FindFirstChildWhichIsA("ModuleScript")
if moduleScript then
local Function = require(moduleScript)
if Function.Run then
return Function.Run()
end
end
end
Finally, create a new NodePreset called CommandLock, which is effectiely just a renamed Command. Be sure to amend the attributes to properly reflect the new name.
This little node will allow you to return true or false to determine if a node is locked, or unlocked. It’s very handy for stuff like quest chains.
I will finally add that the router conditional someone earlier in the thread works as they designed, but you need to place that elseif above the block which runs modulescripts i.e. place it second to last.