Skip to content

Commit

Permalink
add more nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
IzaZed committed Nov 11, 2023
1 parent 4000915 commit 9d812f1
Show file tree
Hide file tree
Showing 158 changed files with 361 additions and 85 deletions.
Binary file added source/images/Logic_Nodes/gamepad_active_node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/Logic_Nodes/gamepad_look_node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/Logic_Nodes/gamepad_sticks_node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/images/Logic_Nodes/key_down_node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/images/Logic_Nodes/load_file_node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/images/Logic_Nodes/mouse_button_node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/Logic_Nodes/vr_headset_node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions source/manual/logic_nodes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,4 @@ Logic Nodes
:maxdepth: 2

introduction.rst
basic/index.rst
scene/index.rst
logic_math/index.rst
data/index.rst
utilities/index.rst
nodes/index.rst
2 changes: 1 addition & 1 deletion source/manual/logic_nodes/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Introduction
============

As an alternative to Python scripts and Logic Bricks, Logic Nodes try to provide an intuitive and versatile
As an alternative to Python scripts and Logic Bricks, Logic Nodes provide an intuitive and versatile
way to create game logic. They are designed to support rapid prototyping, enabling artists and game designers
to quickly test and even fully implement features.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
++++++
Events
++++++

.. toctree::
:maxdepth: 2

custom/index.rst

.. toctree::
:maxdepth: 1

on_init.rst
on_next_tick.rst
on_update.rst
on_value_changed.rst
on_next_tick.rst
on_value_changed_to.rst
on_value_changed.rst
once.rst

.. toctree::
:maxdepth: 2

custom/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ The *Once* node restricts a continuous *True* condition to only the first frame.

*Example*: An :doc:`./on_update` linked to a *Once* node would be equal to the :doc:`./on_init`.

Parameters
=======

Timer
Reset this node after a time of tree inactivity. This is only needed when stopping
and starting logic trees.

Inputs
=======

Expand All @@ -23,13 +30,6 @@ Repeat
Reset After
Reset this node after X seconds. Only relevant if the *Timer* parameter is active.

Parameters
=======

Timer
Reset this node after a time of tree inactivity. This is only needed when stopping
and starting logic trees.

Outputs
=======

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ from a previously saved ``.json`` file.
.. note::
No information is read about which scene is loaded, so this node can only be used per scene.

Parameters
==========

Filepath
The path to where the save files are stored.

Inputs
=======

Expand All @@ -24,12 +30,6 @@ Condition
Slot
Index of this save file.

Parameters
==========

Filepath
The path to where the save files are stored.

Outputs
=======

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ The *Save Game* node stores information about the state of the scene in a ``.jso
.. note::
No information is saved about which scene is loaded, so this node can only be used per scene.

Parameters
==========

Filepath
The path to where the save files are stored.

Inputs
=======

Expand All @@ -23,12 +29,6 @@ Condition
Slot
Index of this save file.

Parameters
==========

Filepath
The path to where the save files are stored.

Outputs
=======

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

+++++++++++++++
Load File
Jump To File
+++++++++++++++

.. figure:: /images/Logic_Nodes/load_file_node.png
:align: right
:width: 215
:alt: Load File Node.
:alt: Jump To File Node.

The *Load File* node is the ingame equivalent of *File->Open*. It loads directly into
The *Jump To File* node is the ingame equivalent of *File->Open*. It loads directly into
the runtime version of another .blend file.

Inputs
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
+++++++++++++++
Gamepad Active
+++++++++++++++

.. figure:: /images/Logic_Nodes/gamepad_active_node.png
:align: right
:width: 215
:alt: Gamepad Active.

The *Gamepad Active* node detects if the controller at given index has any activity.

Inputs
=======

Index
The controller index to monitor.

Outputs
=======

Active
*True* if the controller has activity, else *False*.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
+++++++++++++++
Gamepad Button
+++++++++++++++

.. figure:: /images/Logic_Nodes/gamepad_button_down_node.png
:align: right
:width: 215
:alt: Gamepad Button.

The Gamepad *Button* node detects if a specified button has been pressed on the controller at given index.

Parameters
==========

Button
Which button to react to.

Mode
Input detection mode.

Inputs
=======

Index
The controller index to monitor.

Outputs
=======

Pressed
*True* if the button is active in the selected mode, else *False*.

Strength
Value of the trigger from 0 to 1; Only visible if button is `LT / L2` or `RT / R2`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
+++++++++++++++
Gamepad Look
+++++++++++++++

.. figure:: /images/Logic_Nodes/gamepad_look_node.png
:align: right
:width: 215
:alt: Gamepad Look Node.

The *Gamepad Look* node is a quick way to make objects follow controller stick movement.
It's possible to assign a *Body* and a *Head* object.

If no *Head* object is assigned, the body will be used for both axis, but
that is generally discouraged as it can lead to unwanted side effects.

Parameters
==========

Axis
Which stick of the controller to use for the transformation.

Inputs
=======

Condition
Input Condition.

Main Object
This is the body object

Head (Optional)
This is the head object. If set, both objects will be rotated along their corresponding local axis.

Invert XY
Option to invert movement for each axis (Vec2).

Index
The index of the controller to poll.

Sensitivity
Multiplier for translating mouse movement to object rotation.

Exponent
Exponent for fine-tuning the stick behavior.

Cap Left/Right
Limit the body objects rotation on its local Z axis.

X Limits
The limits for the body objects local Z rotaion (Vec2).

Cap Up/Down
Limit the head object's rotation on its local X/Y axis.

Y Limits
The limits for the head object's local X/Y rotaion (Vec2).

Threshold
Ignore stick values under this threshold.

Outputs
=======

Done
*True* if the node performed successfully, else *False*
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
+++++++++++++++
Gamepad Sticks
+++++++++++++++

.. figure:: /images/Logic_Nodes/gamepad_sticks_node.png
:align: right
:width: 215
:alt: Gamepad Sticks.

The Gamepad *Sticks* node detects stick values of the controller at given index.

Parameters
==========

Axis
Which stick values to read.

Inputs
=======

Invert XY
Invert the axis values.

Index
The controller index to monitor.

Sensitivity
Multiplier for the axis values.

Threshold
Dead-zone for the stick.


Outputs
=======

Vector
Stick values as vector `(X, Y, 0)`
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
+++++++++++++++
Gamepad Vibration
+++++++++++++++

.. figure:: /images/Logic_Nodes/gamepad_vibration_node.png
:align: right
:width: 215
:alt: Gamepad Vibration.

The *Gamepad Vibration* node detects if the controller at given index has any activity.

Inputs
=======

Index
The controller index to vibrate.

Left
Force with which to rotate the weight in the left handle.

Right
Force with which to rotate the weight in the right handle.

Time
Vibrate for this many seconds.

Outputs
=======

Done
*True* if the node performed successfully, else *False*.
13 changes: 13 additions & 0 deletions source/manual/logic_nodes/nodes/basic/input/gamepad/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

+++++
Gamepad
+++++

.. toctree::
:maxdepth: 1

gamepad_button.rst
gamepad_sticks.rst
gamepad_active.rst
gamepad_vibration.rst
gamepad_look.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Input
:maxdepth: 2

mouse/index.rst
gamepad/index.rst
keyboard/index.rst
gamepad/index.rst
vr/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ Keyboard
.. toctree::
:maxdepth: 1

key_code.rst
key_down.rst
key_up.rst
keyboard_active.rst
logger.rst
key_code.rst
instream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ Logger

The Keyboard -> *Logger* node records keyboard activity.

Inputs
=======

Condition
Input condition.

Parameters
==========

Mode
Toggle between *Key Tap* and *Key Down* modes.

Inputs
=======

Condition
Input condition.

Outputs
=======

Expand Down
Loading

1 comment on commit 9d812f1

@lordloki
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IzaZed Thanks for the great update

Please sign in to comment.