Creating" a bullet
by Mick Orbik · in Torque Game Builder · 01/07/2008 (2:27 pm) · 3 replies
Alright... Since my other post was answered pretty quickly, I will try my luck with posting an actual programming question. I am trying to make a simple shooting control system. What I want to do is have W,S,A,D move the characters in their respective cardinal directions (North, South, West, East) and then use the mouse to aim the character. So I need to have events rigged up for MouseMove and MouseButtonDown events (don't know if thats what these are called in torque, but what I need in general). So thats part 1 of my question.
The other part, is how would I "create" the sprite of the bullet. Like in the Create panel of the actual TGB program, I have say a static sprite of the bullet. How would I place a specific one into the world? Like, %bullet = new t2dSprite() or something.
Please forgive me if the question has been answered previously, I tried to search, but I found not a lot. Keep in mind, this is my first time using TorqueScript, although I do have 7 years of C++ experience under my belt. It seems simple enough, but as with any new language, it requires a learning curve, and I am just starting up the first part :).
The other part, is how would I "create" the sprite of the bullet. Like in the Create panel of the actual TGB program, I have say a static sprite of the bullet. How would I place a specific one into the world? Like, %bullet = new t2dSprite() or something.
Please forgive me if the question has been answered previously, I tried to search, but I found not a lot. Keep in mind, this is my first time using TorqueScript, although I do have 7 years of C++ experience under my belt. It seems simple enough, but as with any new language, it requires a learning curve, and I am just starting up the first part :).
About the author
Associate David Montgomery-Blake
David MontgomeryBlake