Logic node property math

yeaa i was playing whit call function but didn’t know how to acces trait is that bullet a function from another OBJ?

Here is a better example ( sort of ):

When you create a function with a Function node, it creates a function on Trait. So to call the function you need to first get the trait of the object that has the node. In the above example I get Gun object that is a child of the current object. I then use the Get Trait node to get the “GunTrait” trait that is applied to the gun. Then I use the Call Function node to call the triggerDown and triggerUp functions of the “GunTrait” trait.

The functions themselves are used like this in my current use-case:

image

This is in the “GunTrait” node tree. I’ve got some custom stuff going on there ( Trigger Single, Shot Delay ), but that should give you the idea.

2 Likes

i get it, that is some organize nodes flow is that part of an specific project ? you working on

What part are you talking about?

The “FireGun” frame is just a built-in feature to group nodes. You can group nodes with ctrl-J.

The Trigger Single and Shot Delay nodes are custom nodes I was testing for a shooter. I just made a small node pack that you can include into any Armory game by putting it in the Libraries folder ( node packs are cool ).

That odd Scene node with the “Mods/player/Player” thing is a part of me working on a moddable game. Modding is somewhat experimental and part of an open PR that I have for armory.

Or maybe you just mean in general. :slight_smile: Yeah, I’m trying to build a moddable shooter game with my small team. I’m trying to work in the necessary Armory features that I can while I go.

2 Likes

yea i knew about the frame i also started a project and was looking in to the nodes let me know if you need help whit any asset 3d or 2d i will be happy to help you out This is my discord ID ElioTheCuban#2053

1 Like

hey i was using the file_write example and am getting this error
i try to publish as window krom and it failed to compile
C:\Users\TheBr\OneDrive\Documents\Armory\armsdk\armory\Sources/armory/logicnode/WriteJsonNode.hx:17: characters 14-35 : Class has no field getFilesLocation

I haven’t been able to get any storage write operations to work yet. This might be handled easier when there is a sys implementation for Krom. ( That is for Haxe, anyway, but it would be easy to create a node after that )

1 Like

Any shooting game would use those.

1 Like

I guess I could add them to the Logic Pack if you think that makes sense. I’m not sure if that is a little specific of a use case to put in the Logic Pack, though.

1 Like

In some game shooter utility pack ?
Each logic pack must have logic nodes that fits in it only.

1 Like

At this point I think you could add anything to the Logic Pack. Technically all of the nodes in there are specific use cases. If we start having to download and keep up to date several different “Logic-Packs” things will get quite messy. Once the search functions is working in 2.8 then extra nodes really don’t make anything worse but having to try to figure out which nodes come from where.

Sounds good, also I added the ability to specify arbitrary node categories in the add node panel earlier, so we can easily create new groupings as they are needed. :slight_smile:

1 Like