Dial set acceleration

From Sim Innovations Wiki
Jump to navigation Jump to search


dial_set_acceleration(dial_id, acceleration) 

dial_set_acceleration is used to set a new acceleration value for a dial.

Return value

This function won't return any value.


# Argument Type Description
1 dial_add ID Dial identifier. This can be obtained by calling dial_add.
2 acceleration Number A multiplier that will make the dial generate extra callbacks when the dial is being rotated faster. The multiplier is the maximum number of callbacks of one dial tick when this dial is being rotated at maximum speed.


function callback(direction)
  print("dial has been turned")
dial_id = dial_add("a.png", 100,100,100,100,callback)

-- Set acceleration
dial_set_acceleration(dial_id, 2)