TGB moveMap vs ActionMap (partialy solved)
by Jeffrey Gonzalez · in Torque Developer Network · 08/03/2009 (6:53 am) · 2 replies
Background (in nutshell): I recently figure out that a 2d world is more suited to my project then a 3d world. to keep it smaller and simpler. So I downloaded Torque Game Builder(TGB).
Question:Where can I find the difference between an ActionMap and a moveMap?
I figured out from the documentation that a moveMap is an ActionMap. I also figure out from Tutorial how to use a moveMap.
moveMap uses bindObj method while actionMap uses bind. seems with the functions are called the Parms are differnt. both have %val that will be a 1 if the key is pressed or a 0 if the key is not pressed.
vs.
This is the info I have been able to deduce. What I would love is a like to moveMap and it definition. If the only info is in the code, no biggie I can go through that as well. Just point me in the general direction and I will find it
Thanks
Jeff
Question:Where can I find the difference between an ActionMap and a moveMap?
I figured out from the documentation that a moveMap is an ActionMap. I also figure out from Tutorial how to use a moveMap.
moveMap.bindObj(keyboard, "A", "moveUp", %this);vs.
testActionMap.bind(keyboard, "u", toggleU);
moveMap uses bindObj method while actionMap uses bind. seems with the functions are called the Parms are differnt. both have %val that will be a 1 if the key is pressed or a 0 if the key is not pressed.
on fishControlsBehavior::moveUp(%this, %val)<-- from the mini Behavior tutorial
vs.
function toggleU(%val)<-- TGB Documentation
This is the info I have been able to deduce. What I would love is a like to moveMap and it definition. If the only info is in the code, no biggie I can go through that as well. Just point me in the general direction and I will find it
Thanks
Jeff
#2
I still do not understand how I am suppose to know that when I use .bindObj I need to create a function with (%this, %val) and when I use .bind my function would have (%val).
Well back to searching the Documents for a clue.
08/03/2009 (5:41 pm)
Ok further research using agent ransack I discovered that my in TGB I do not have a client/default.bind.cs. I found most of what I was looking for in either the game.cs, main.cd and a common.cs this seems to have the default tilde as well as the creation of moveMapI still do not understand how I am suppose to know that when I use .bindObj I need to create a function with (%this, %val) and when I use .bind my function would have (%val).
Well back to searching the Documents for a clue.
Torque 3D Owner Jeffrey Gonzalez
it states that there is a client/default.bind.cs. I do not seem to have a file named that. However the post show the code from it
This tells me that moveMap is an actionMap. Now I just have to figure out why moveMap usung bindObj instead of just bind.
A searching I go.