Game Development Community

Ease of creating lines like Rack 'em Up Road Trip?

by David Janik-Jones · in Torque Game Builder · 06/04/2007 (12:23 pm) · 3 replies

How easy is it to code something simple like seen in Rack 'Em Up Road Trip (billiards) where you could do the following ...

1. Click (and hold) on an object like a marble
2. Pull back
3. Have a glowing line stretch out 180 degrees opposite your pulling direction showing "force"
4. Then let go and have the object fire off along that line.

You might also want to add a left/right mouse movement to change direction.

Easy? Intermediate? Difficult?

Thanks.

#1
06/04/2007 (1:42 pm)
If you created the line via a .png graphics.... Easy :) Some basic math and sprite positioning. All in script.
#2
06/04/2007 (1:49 pm)
Cool, thanks.
#3
07/23/2007 (10:36 am)
I would be most grateful, now that I am trying the new 1.5.1 tutorial, to see how simple this really is in code. It'll make my buying decision - whether or not to invest in TGB - much easier.

While I know it's alot to ask someone, I'd really be appreciative if anyone would be kind enough to code something like this for me. Simply a script that I can attach to any of the sample sprites in the demo to both learn from and see if it'll work.

So that when I click down on the sprite and pull away ... a line (any type will do) appears in the opposite direction equal to the length of the pull away, and when I let go of the mouse button the sprite fires off along that line at a given strength.

Would anyone volunteer, please?

Thanks in advance.

David

PS. While I know how to set up colliders with other objects and world boundaries as I tackle the tutorials, I may need to be told how to bring this bit of script "into" a demo project I'm creating.