#When I call GetValue() it returns the basevalues. Not the modifiers added.

1 messages · Page 1 of 1 (latest)

limpid river
#

Modifiers just doesnt add to basevalue and finalvalue is same as basevalue

cedar shuttle
#

Replace = + with +=. = + means "equals to the positive value of", while += means "increase its own value by".

limpid river
cedar shuttle
limpid river
#

yes I can see them in debug mode

ebon dagger
#

Got it, will have a look

green hedge
limpid river
green hedge
limpid river
#
    {
        int finalValue = baseValue;
        modifiers.ForEach(x => finalValue += x);
        return finalValue;
    }```
green hedge
#

That should work

#

The problem must be somewhere else then. You can confirm it by logging the finalValue before return.

#

Why is that in the advanced channel btw?😅

limpid river
#

its a simple problem to say Advanced

green hedge
#

Yeah. It is in advanced though.

limpid river
green hedge
#

yes

#

Maybe add some more context to the log

limpid river
#

Okay I found the problem

#

It calls ChangeValues() before I use the equipment from inventory so there isnt any modifier