Calculate bug for variables


this doesnt work while

this work

You seem to be using entity attribute (( temporary speed of ( unit1 of ( owner of ( last ability casting unit ) ) ) )) in the first image, and player attribute ((temporary speed of ( owner of ( last ability casting unit ) ) )) in the second. Do you mean to use the same function for both of them?

1 Like

i mean i cant use unit 1 variable in the calculate

From this script, it seems you want a player to own more than one unit. Otherwise, I recommend you use the latter. I don’t know what your game is all about, but I guess you did not set entity attriute “temporary speed” to unit1, but the player itself.

So if you want to make the former work, set “temporary speed” of unit1, not that of player.

And also make sure that you specified
・Entity attribute “temporary speed” of unit1

so you think calculate work with variable ?