• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help with doChangeSpeed(cid, delta)

vena

New Member
Joined
Jun 21, 2017
Messages
65
Reaction score
2
Hi,
I would like every player to get the same speed level at the event, how do I do this? and restored after.
Tfs 1.2 doChangeSpeed(cid, delta)
 
For the first u have to "save" somewhere the base speed of character (common speed that character is walking normally on normal map [not in event]) so you have to put this at the moment when character is appearing at the event room:
Lua:
local startingSpeed = creature:getBaseSpeed() - this will return default base character speed (standard one, before event)
After "saving" default character speed you have to use :
Lua:
creature:setBaseSpeed((startingSpeed + extra speed)) -- replace "extra speed" for your own value that should be added to base speed during event
To add additional speed to base speed for the event.
After the end of event character speed should back to default speed value (starting speed).
You can also "save" this "speed values" inside player storage or something.
Only sky is the limit and your brain.

and please... stop using doSomethingFunctions from 0.4/036pl1 from compact.lua, you working on TFS and you mention function from old engines.

Hope it helps. Have a nice day!
 
Last edited:
Back
Top