Torque Football?
by Wayne Eversole · in Torque Game Engine · 02/25/2007 (5:35 am) · 3 replies
Anyone have any example football code for torque or know where to start it out?
Thanks
Thanks
About the author
by Wayne Eversole · in Torque Game Engine · 02/25/2007 (5:35 am) · 3 replies
Torque Owner Aaron E
Default Studio Name
I've never tried it, but if I wanted to build a 'quick and dirty' prototype of a football game, I would set up Zod's Multigametype starter kit because it has several nice competition features built-in. If you haven't tinkered with it yet, you should spend some time with it, while keeping an eye toward different ways you can apply it to football.
The kit already has scripts for multiple team & spectator selection, individual & team scoreboards, CTF and throw functionality for weapons, ammo & health and team *flags*.
In my 'fast and loose' prototype, I would probably make the football a CTF flag object. I can't remember what the default flag throw keybind is in the MGT starter kit, but it's not hard to find. Anyway, this throw feature can be improved with a charge/timer for increased distance -- check out the grenade script for examples on that.
Every player would have a slot for the football 'flag', but there will only be one football in the game. If a flagless player is hit by a thrown football or collides with an unmounted football, he picks it up and can run with it.
To test this, host a CTF game in the Starter Kit, then have a friend join the match, pick up the opposing flag and bring it to you. Now you and your friend can take turns throwing the 'football' flag back and forth to each other.
The CTS mission already has 'have-flag' collision detectors built into it, so that could be a starting point for building a good downs/scoring system.
Again, this is just one possible way to move toward your goal. (pun intended). I'm sure there are several better ways, but this is how I would approach it.
Have fun