XNA Creators Club Online
Page 1 of 1 (5 items)
Sort Posts: Previous Next

I am firing cannons not cannonballs!

Last post 7/27/2009 11:06 PM by Jim Perry. 4 replies.
  • 7/27/2009 8:58 PM

    I am firing cannons not cannonballs!

    I am on the 2D tutorial and the gun fires itself.
    http://pastebin.com/m3a1ca77e

    What have i done, i spent 2 hours on it!
  • 7/27/2009 9:01 PM In reply to

    Re: I am firing cannons not cannonballs!

    Answer
    Reply Quote
    lol.  Looks like your issue is here:
    1. cannonballs = new GameObject[maxCannonBalls];
    2.             for (int i = 0; i < maxCannonBalls; i++)
    3.             {
    4.                 cannonballs[i] = new GameObject(Content.Load<Texture2D>(
    5.                     "Sprites\\cannon"));
    6.             }
    Note how you're assigning the texture "Sprites/cannon" to the cannonballs.  You probably just want to add a cannonball sprite and use that for the canonballs gameobjects

    Joel Martinez - XNA MVP
    Blog: http://codecube.net
    XNA Unit Testing: Scurvy Test
  • 7/27/2009 9:03 PM In reply to

    Re: I am firing cannons not cannonballs!

    Lol, I hope you get this fixed, the above post sounds like it makes sense. The image in my head of this makes me laugh, I'd love to see a screen shot.
  • 7/27/2009 10:13 PM In reply to

    Re: I am firing cannons not cannonballs!

    Kris Steele:
    Lol, I hope you get this fixed, the above post sounds like it makes sense. The image in my head of this makes me laugh, I'd love to see a screen shot.

    It is a sight! I was shocked when they came out and not cannons lol 

    How do i take a screenshot on an xbox? 

    THANKS for the help guys!
  • 7/27/2009 11:06 PM In reply to

    Re: I am firing cannons not cannonballs!

    cmpunk771:
    How do i take a screenshot on an xbox? 

    Start your 360 game in Debug mode, launch the XNA Game Studio Device Center from VS, right click on the 360 and select Take Screen Capture.
    Jim Perry - Microsoft XNA MVP
    If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job.
      Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki.
        Please mark posts as Answers or Good Feedback when appropriate.
Page 1 of 1 (5 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG