-
Notifications
You must be signed in to change notification settings - Fork 2
Custom Axis
With Custom Axis, you can program your own axes with Python.
This axis requires full installation of Lench Scripter Mod as it uses it's Python engine. Read it's documentation here. All of the mod's functionality is also supported through ACM custom axes.
-
Initalisation code gets run once when the axis code starts. In here, you should import modules, define variables and get references to other axes, controllers or blocks.
-
Update code is run on every frame while the axis code is running. It must return a numeric value. In here, you should implement the axis logic.
-
Global scope toggle determines whether the axis code will be run in global or local scope. In local scope, every axis has it's own variables, but you can still access other axes through the AdvancedControls API. In global scope, all defined variables are shared with other global axes.
The default example uses Sine function of time to calculate and return the axis value.
Another example that takes the value of an existing axis and returns it's absolute value. Read more in AdvancedControls API.
If you intend to share a machine with custom axis that uses the ACM API to read input from other axes, make sure to retrieve axis reference in initialization code like shown above. That way the mod can recognize the referenced axis and include it in machine file.
Tips:
-
You can access blocks with
Besiege.GetBlock(...)and use them to automate your tasks, for example to automatically extend or retract landing gear when at a certain altitude. -
Use
UnityEngine.Inputto listen for key presses. For example:if Input.GetKey(KeyCode.LeftArrow): # do something if left arrow is down else: # do something else otherwise
-
You can change axis tuning through AdvancedControls API if you need to. Use this with caution.
API
API exposed to Python scripts, custom axes and other mods.
Sharing
Concepts behind the mod design and machine sharing.
Controller axis
Help regarding controller axis.
Key axis
Map keys, buttons and hats to an analog input axis.
Mouse
Use mouse position as input.
Chain axis
Chaining axes for complex input configurations.
Custom axis
Custom axes for everything else.
Controls
Full analog control list.
Console commands
Mod configuration console commands.
Fueled by coffee


