Jump to content

variable help!


dthrasher90
 Share

Recommended Posts

Im trying to write a piece of code for a football game that goes something like this.  Where, you check to see if the team has scored and if they have scored on the previous play, you run the kickoff function.  Here is where I am having problems.  I want to use one  function for the pass plays, but I am having trouble updating the ball location.  The football is derived from a tween and onComplete the x value is stored in newBallSpotx.  Also noted, all the players a derived around the center's location .  So like wr1 = ct.x + 150 (or whatever).  My question is how can I check the center's value to see if he needs to start a new drive at the 20 yard line or if there is a drive in progress to use the last position logged. And I dont want to use phaser's update function.  Any help would be great.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...