Axis
The global axis module, contains everthing axis has to offer.
Properties
Promise
This item is read only and cannot be modified. Read OnlyAxis.Promise:
Promise
External promise library
ServerConfigs
This item only works when running on the server. ServerThis item is read only and cannot be modified. Read OnlyContains all the configs
Player
This item only works when running on the client. ClientThis item is read only and cannot be modified. Read OnlyAxis.Player:
Player
Functions
GetModule
Returns the module with that name
CreateModule
This item only works when running on the server. ServerReturns a table to use for the module. This table contains some axis-related stuff
local MyModule = Axis.CreateModule {
Name = "MyModule";
Client = {};
}
function MyModule:Init()
print("Init")
end
function MyModule:Start()
print("Start")
end
return MyModule
CreateSignal
Axis.
CreateSignal
(
) →
SIGNAL_MARKER
Creates a marker that will turn the key into a remote signal once Axis is booted
local MyModule = Axis.CreateModule {
Name = "MyModule";
Client = {
-- Create the signal marker, which will turn into a
-- RemoteSignal when Axis:Boot() is called:
MySignal = Axis.CreateSignal();
};
}
CreateUnreliableSignal
Axis.
CreateUnreliableSignal
(
) →
UNRELIABLE_SIGNAL_MARKER
Creates a marker that will turn the key into a unreliable remote signal once Axis is booted.
Unreliable Events
Internally, this uses UnreliableRemoteEvents, which allows for network communication that is unreliable and unordered. This is useful for events that are not crucial for gameplay, since the delivery of the events may occur out of order or not at all.
See the documentation for UnreliableRemoteEvents for more info.
CreateProperty
Axis.
CreateProperty
(
InitialValue:
any
) →
PROPERTY_MARKER
Returns a marker that will turn the key into a remote property one Axis is booted. An initial value can be passed.
RemoteProperties are great for replicating data to all of the clients. Different data can also be set per client.
local MyModule = Axis.CreateModule {
Name = "MyModule",
Client = {
-- Create the property marker, which will turn into a
-- RemoteProperty when Axis:Boot() is called:
MyProperty = Axis.CreateProperty("HelloWorld");
},
}
CreateController
This item only works when running on the client. ClientWrapper function for controller system function
local MyController = Axis.CreateController {
Name = "MyController";
}
function MyController:Init()
print("Init")
end
function MyController:Start()
print("Start")
end
return MyController
GetController
This item only works when running on the client. ClientWrapper function for controller system
AddModule
This item only works when running on the server. ServerWrapper function for module system function
AddModules
This item only works when running on the server. ServerAdds the modules within the parent.
caution
This only adds children, use AddModulesDeep to add descendants
AddModulesDeep
This item only works when running on the server. ServerAdds any modules within the parent folder, this includes in sub-folders
AddController
This item only works when running on the client. ClientWrapper function for controller system function
AddControllers
This item only works when running on the client. ClientAdds the controllers within the parent.
caution
This only adds children, use AddControllersDeep to add descendants
AddControllersDeep
This item only works when running on the client. ClientAdds any controllers within the parent folder, this includes in sub-folders
Boot
Axis:
Boot
(
) →
boolean
--
Was boot successful
Start core systems and initialize all core modules