#You can convert number from string

1 messages · Page 1 of 1 (latest)

last beacon
#

Right, but I need a number value for the player's speed to be set in the TimedAction for this bit of the action file: <m_SpeedScale>LCombatSpeed</m_SpeedScale>
I can set this now on start of the TimedAction with: character:setVariable("LCombatSpeed", speed)
But that only affects the local player. I need that speed to be set for just this TimedAction. Storing it as a string wouldn't help, as it wouldn't apply to the action's speed.

lime wadi
#

If set number, it not sync?

last beacon
#

For TimedActions to sync anim states afaik, you have to use action:setAnimVariable("Variable", value)
And the value there can only by a string or a bool, it doesn't accept numbers. So I have to manually sync the speed i want to all players, and assign it myself.

#

setting the animation variable directly on a player via character:setVariable() does not sync from what i can find

lime wadi
#

Oh, I see. I added to my task list add function setAnimVariable that get float value

#

Now you can do another stuff. Sync string value and on clients OnTick check this param, convert to float and set to player