Game Development Community

Game Help

by George Fairs · in Torque Game Builder · 11/29/2008 (1:48 pm) · 4 replies

Hey everyone,

I have started to get the hang of TGB, and I have a few good ideas for a game. It oshould be a basic top-down shooter like game, and I know how to do basic movement... But how would I go around making 360* rotation movement, with mouse moving direction, and WASD moving the actualy character. How would I script the rotation setup?

I can do the basic movement like this:

function PlayerThing::onLevelLoaded(%this, %scenegraph)
{
moveMap.bindCmd etc.etc.....
}

So any help would be MUCH appreciated.... Thanks :)

#1
11/29/2008 (3:02 pm)
Try using the faceMouse input behavior. Give your character that behavior and see how it works out.

As a bonus, hide the canvas mouse cursor and use a cross-hair sprite instead. Give the cross-hair the followMouse behavior.
#2
11/29/2008 (4:17 pm)
Hmm, followMouse behaviour? Where would I find the script to program this behaviour, is it the the Test Demo thing? Anyway this helps alot, but I still need some help. Thanks in advance...
#3
11/29/2008 (5:14 pm)
Check out the BehaviorPlayground project. There's a ton of useful behaviors there, as well as the BehaviorShooter project.

I used quite a few of those as a basis for behavioralizing TGB Adventure Kit.
#4
11/30/2008 (12:47 am)
Ok thanks :D But does the behviourPlayground cover the idea I want? Movement whilst turning?