armory3d / armory3d/armory

[Logic nodes] Math assign node

Open
#2,224 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request good first issue logic nodes
Dominant language
C++
Stars
3.3k
Forks
353
Avg merge
3d 16h
Merged PRs (30d)
1

Description

The purposeof these nodes would be to shorten node graphs slightly by removing the need of having a separate math node.

Im sure a lot of people might think it seem excessive. Personally I think its worth a node of its own considering how often you might just want to increment or decrement a variable by 1, a node like this could help a lot.

Most programming languages has custom assignment operators like +=, *=, -= (etc) which lets you modify and assign a variable in one line without having to write out the variable name twice - the purpose of this node would be pretty much the same.

UE4s popular Blueprint system has something similar (but less generic): https://answers.unrealengine.com/storage/temp/56085-notify.png

In practicse, the node would have the same inputs/outputs as the existing math node, except that it would also assign the output value to the variable that is fed into the first input. Alternatively this could also be an tickbox "assign to first output" on the already existing math node.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the existing math node and how its first input and output connect to variables in node graphs. Compare the proposed dedicated assignment node with the alternative checkbox on the math node, then define the supported assignment operations and confirm that the selected approach updates the first input variable as described.

Written by the indexing model from the issue text.

Assessment

Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.