I was thinking of making a football game, it would be like
Pick a play: Long Pass, Short Pass, Medium Pass
and things like , run middle, run right, run left, etc.
I was wondering how I would keep a track of the first downs.... (Including loss of yards, penalties, etc)
Generally, it's usually 10 yards for a first down.
Any ideas?
ID:153899
![]() Nov 5 2002, 3:57 pm
|
|
Yeah, you could just have FirstDown be a variable and do something like:
Kickoff returned to the 20 Yard Line, Bear's first down at the 30. ( var/FirstDown = 30 var/Pos = 20 var/Play = "Run Middle" var/CurrentDown = 1 } 1st & 10: Bears run up the middle for 3 yards { var/FirstDown = 30 var/Pos = 23 var/Play = "Screen Pass" var/CurrentDown = 2 } 2nd & 7: Bears pass Complete for gain of 5 yards { var/FirstDown = 30 var/Pos = 28 var/Play = "Run Left" var/CurrentDown = 3 } 3rd & 3: False Start: 5 Yard Penalty; repeat down { var/FirstDown = 30 var/Pos = 23 var/Play = "Deep Pass" var/CurrentDown = 3 } 3rd & 8: Incomplete Pass { var/FirstDown = 30 var/Pos = 23 var/Play = "Punt" var/CurrentDown = 4 } And that would just continue with Offense & Defense changing places appropriately. :-) |
Sariat wrote:
I was thinking of making a football game, it would be like What about a text MUD football game... Punkrock546 |
Sariat wrote:
So you're suggesting that I make a new variable for each Me too. I don't believe ShadowWolf means building a new set of vars for each possibility - that would be insane, and very in-efficient - but to take his idea and make a proc() out of it would be a good thing. |
So regardless of penalties, the line remains where it was set at the beginning of the downs... All you've got to do is set its yard line to a variable, and then if the ball makes it past that yard line, there's a first down... Penalties and other losses of yards won't cause any conflict with keeping track of the first down...