Game Development Community

need help adding snap functionality

by Jeremy M · in Torque Developer Network · 08/06/2013 (5:38 pm) · 1 replies

Hello community,

Recently i have decided to attempt adding more snap options into the main editor. i have been unable to locate any resources that talk about this sort of thing however and my experiments have epically failed.

basically i edited these files


i edited the "snapToBar" inside the gui editor and added my button. in the field "Command" i wrote in toggleSnappingOptions("grid"); (to copy the grid command to test my button)and i set my parent to "snapToBar". i copied all the settings of the other buttons so they were identical, just gave it a different name.

at first it all seemed to go fine but then i noticed somehow my file, edit, layout, move, snap, and help menus all dissapeared. everything moved up on my screen and some of my other menus got messed up. not entirely sure why. however my button was there and toggled. but didn't do anything. i looked through all the scripts for some reference to the global variables used by "snapToBar" and i looked for anything referencing snap. and those were the only two scripts i found talking about snapping.

so i guess what im looking for here is any sort of help finding the scripts i need to edit or maby some useful links on tutorials for editing the main gui used by the editor. or how to add plugins to overwrite whats already there.

for a little background on my experience level i have only been using torque 3d for a about six months. i have been learning to code for maybe a year, year and a half and i have been using blender 3d for about 3 years. when i started using blender i wanted to make games but i didn't want to learn much about coding but about a year ago my attitude changed once i realized that its just about impossible to do without a

About the author

I have a long history of playing games. i started using blender in 2010 and really wanted to get involved in torque back in 2011. however i never really had the funds to warrant buying it. I'm super excited it went open source MIT though.

Recent Threads

08/19/2013 (5:23 am)
you may be better posting this in the professional forum, you will get a better response.