Modification of behaviors
by Sobo · in Torque Game Builder · 11/15/2007 (11:51 am) · 2 replies
Does anybody know how to change the "shoot" behavior so that my object can shoot when the left mous button is clicked. The mous buttons cant be selected in this behavior but I would really need this function in my game.
My "company" is now working on a really cool game called MoonLander. Its under development but check out the early released version at www.sobkowiak.se
My "company" is now working on a really cool game called MoonLander. Its under development but check out the early released version at www.sobkowiak.se
About the author
#2
It seems that "keybind" type of addBehaviorField() does not contemplate mouse device. No problem: Go to tdn.garagegames.com/wiki/TGB/Behaviors/CreatingBehaviors and you will see how the sample uses a mouse callback. You can use this to modify the Shoot behavior in order to satisfy your needs.
Hope it helps :)
11/25/2007 (10:32 am)
Hi Adam!It seems that "keybind" type of addBehaviorField() does not contemplate mouse device. No problem: Go to tdn.garagegames.com/wiki/TGB/Behaviors/CreatingBehaviors and you will see how the sample uses a mouse callback. You can use this to modify the Shoot behavior in order to satisfy your needs.
Hope it helps :)
Chaim Krause
Chaim Gang
I am happy to see new members in the TGB community. I am glad that this community helps other members. I don't help out as much as I should. However, sometimes community members need to help themselves before they ask for help. Your question has a very simple answer. An answer that can be found in many places. One example, are the multiple mouse behaviors on the same TDN page as the shoot behavior. Others are in the help system. Yet more in the various examples on TDN. Please show us that you have at least exhausted these options before asking for help.
I am not picking on you. Please don't take this personally. This is a small, but growing community. We need to, for the time being, do our best to exhaust all other options before asking other members of the community to spend their valuable time answering questions that are answered elsewhere. We don't have time to do things multiple times.
Experienced members of this community can better server newer members by contributing to the TDN Wiki, adding Resources, and other means that allow better teacher:student ratios that answers to questions in a forum that does not provide for any means of useful searching.
Again, I don't mean to pick on you Adam. You just happened to be the first question of this nature I came across on my first trip through these forums today.
Now, if you would excuse me. I am going to practice what I preach and go add some stuff to the TDN wiki.
--Chaim