Game Development Community

GuiSliderCtrl snap to tick

by Jacob Wagner · in Torque Game Builder · 11/21/2005 (11:29 pm) · 0 replies

I noticed that there was some code for torque to snap a gui slider control to each tick, so that if you have ticks set to integral values, it will just snap to the integer values.which seems incredibly useful imo, especially for the game I'm making..I don't want people to be able to buy 4.509349 of narcotics, I want them to buy 4 exactly. :)

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7310

However, it seems to be working only for torque, I tried compiling it and got errors.

Is there a solution for doing this in torque 2d?