Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Steering a sprite with Lingo. (Desperate for help!)

Status
Not open for further replies.

CrazyJR

Programmer
Oct 3, 2001
5
AU
I'm in the process of making a game with Director using Lingo and I wanted to know if anyone here could help me with a script that I need.

For example, I have a sprite that is the top-down view of my vehicle (in this case, a car). I need to know how to get it to rotate either CW or CCW when 123 and 124 keys (or equivilent) are depressed. Right, now this is the part I need help with, I need to get the sprite (car) to drive forward in whichever direction it is facing by pressing the forward on the keypad (or equivilent key) and be able to be steered 'on the move' by pressing the rotation keys (123 & 124). All of this is quite similar to the control system used in the Mac tank game 'Bolo', but I am using it in a different context. I would be extremly grateful if someone could help me out. Thanks in advance.
 
on mouseDown
sprite (x).rotation=sprite (x).rotation+1 (1 equals the
end
number of degrees

this is simple rotation function.
 
Thats difficult. You need to use SIN and COS and all that stuff, set up some SIN tables. I've never gotten it to work in VB, Director, QB, or anything, all I know is it normally uses thoes math stuffs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top