Game Development Community

Mouse input still not working?

by Kevin James · in Torque Game Builder · 05/28/2007 (8:13 am) · 3 replies

Hi everybody!

I'm working on a vertical scroller game right now, and I need to have some turrets fire when I press the first mouse button. In previous builds of TGB I used a t2dSceneGraph.onMouseDown() callback, because the input for the mouse didn't work in actionmaps.

I thought that by now input for the mouse in actionmaps would be working, but I've been unsuccessful thus far. I've had limited time so I've only tried button0.

Any suggestions?

About the author

Computer security, digital forensics, and platform jumper enthusiast. shells.myw3b.net/~syreal/


#1
05/28/2007 (8:29 am)
Yes, have a look at the input behaviors :)
#2
05/28/2007 (4:25 pm)
Oh, the event must be mouse0 not button0?

Or possibly the device is mouse0 not mouse.
#3
05/28/2007 (4:32 pm)
This is the line:

moveMap.bindCmd(mouse0, "button0", %this @ ".fireGun();", "");

I was using "mouse" before instead of mouse0, so I was expecting this line to work, but it doesn't. Oh and before anyone mentions it, I am passing in %this to the function.