Download

i require help as i cannot figure out how this works

this node thingy i was trying to do for a game for armor as i followed along a tutorial i ran into a problem of not knowing why one of the nodes’ connecting points has a blue color instead of green and so the editor refuses to let me compile it

The different colours of the inputs and outputs of the nodes are because they are different data types - e.g boolean, integer, float, object reference etc etc etc. You can right click most connecting points and select promote to variable. Then look at the type of the variable that has been created for you - it will be the data type of that connection.
I think the problem that you have above is that you have used ‘get player character’ but have not specified the player that you want to get the character for. The usual solution is to use ‘get player controller’ (and maybe have to cast it to your player controller type) but, since you are in a widget you should use ‘get owning player’. The error messages are telling you that it is not happy with the input to the ‘cast to ThirdPersonCharacter’ - that the object pin input is invalid. I know the messages can be a little strange at first but they usually make some sort of sense.

Actually, the character is specified because he would not be able to get the armor variable out of it otherwise.


One thing you can try is to drag backwards the blue wire out of the return node and search for “make”. This usually will create a node with the appropriate components that make up the blue data wire; it works the same as a rotator, vector, or transform wire, it’s a collection of other data types. In some cases you won’t get any good make or break node from the data wire however.

The data wire in this case should be made up of 4 float values, rgba, as that’s what makes a linear color; which is presumably what your data wire is.