Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logic node "Trait" does not work depending on conditions #1529

Closed
Sandy10000 opened this issue Dec 26, 2019 · 1 comment · Fixed by #1646
Closed

Logic node "Trait" does not work depending on conditions #1529

Sandy10000 opened this issue Dec 26, 2019 · 1 comment · Fixed by #1646
Labels
bug This issue describes a bug

Comments

@Sandy10000
Copy link
Contributor

Description
Click here for related forum page.(https://forums.armory3d.org/t/remove-object-if-it-has-contact-with-object-from-collection/3788)

If try to apply a trait that has not been applied to any other object using "Add Trait", the "Trait" node will not get the Trait. Specifically, "cname" is Null both times.

In the test file, press the space bar to fire a bullet. By setting traits in advance for Suzanne (unnecessary objects), can acquire traits and the first bullet firing works without any problem. However, after the second bullet, there is no error but no trait has been applied. (The bullet does not disappear)

By commenting out the following line, the trait is applied to the second and subsequent bullets.

if (value != null) return value;

To Reproduce
Run the test file.

Expected behavior
Allows to get traits that have not been applied to any objects.

System
Blender:2.81
Armory:2019.12

Test File
Trait.blend.zip

@MoritzBrueckner
Copy link
Collaborator

MoritzBrueckner commented Apr 10, 2020

The issue was that Traits were not exported when unused. Now there is a "Fake User" option added to address this in #1646.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants