Author Topic: RoboGun: My first big axe game  (Read 24753 times)

0 Members and 1 Guest are viewing this topic.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Robo-Gun: My first big axe game
« Reply #60 on: November 12, 2011, 06:22:58 pm »
For the random bullet, I fixed it by putting the shooting part at the beginning of the main loop, and moving my getkeys to the end of the loop after the display graph. Could I take a look at your code inside the loop? I might be able to help!
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Robo-Gun: My first big axe game
« Reply #61 on: November 12, 2011, 06:45:44 pm »
Ok. I'll pm you the main loop.

Robo gun is 76.429% done! :P
« Last Edit: November 12, 2011, 06:54:57 pm by epic7 »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Robo-Gun: My first big axe game
« Reply #62 on: November 12, 2011, 09:22:19 pm »
Can anybody fix this health code?

Code: [Select]
For(P,0,C)
If abs({P*2+L1+1}-Y)<7
If abs({P*2+L1}-X)<7
E--
End
End
End
Text(40,1,"HEALTH:")
Rect(66,2,(66+(E/2)),5)
If E<1
2->N
Return
End

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Robo-Gun: My first big axe game
« Reply #63 on: November 12, 2011, 09:26:04 pm »
Well, Whats wrong with it? What is it doing that your don't want?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Robo-Gun: My first big axe game
« Reply #64 on: November 12, 2011, 09:33:53 pm »
Usually the dying works but the rect doesn't work. Sometimes, the rect shortens then fills up again and you never die.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Robo-Gun: My first big axe game
« Reply #65 on: November 12, 2011, 09:35:45 pm »
Oh yeah, I remember seeing that. What is 'E' originally?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Robo-Gun: My first big axe game
« Reply #66 on: November 12, 2011, 09:40:22 pm »
60

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Robo-Gun: My first big axe game
« Reply #67 on: November 12, 2011, 09:42:29 pm »
wow, I'm a fail, I already printed off the code so I could look it over earlier, all I had to do was look down! :P Oh well. Anyways, I'll look it over later, I'm tired now.
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline chattahippie

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +27/-0
  • Super Member! :D
    • View Profile
Re: Robo-Gun: My first big axe game
« Reply #68 on: November 12, 2011, 09:49:55 pm »
Try:
Code: [Select]
For(P,0,C)
If {P*2+L1+1}-Y<7+({P*2+L1+1}-Y>65529)*({P*2+L1}-X<7+({P*2+L1+1}-X>65529))
E--
End
End
Text(40,-39,"HEALTH:")   //"-" is subtract, not negative
Rect(66,-64,E/2,3)   //"-" is subtract; the third/fourth arguments are how long/wide the rectangle is, not end points
If E<1
2->N
Return
End
Also, I fixed the double If because it might help your problem

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Robo-Gun: My first big axe game
« Reply #69 on: November 12, 2011, 09:54:28 pm »
Why the negative y coord stuff?

Offline chattahippie

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +27/-0
  • Super Member! :D
    • View Profile
Re: Robo-Gun: My first big axe game
« Reply #70 on: November 12, 2011, 09:55:34 pm »
Because you were using the absolute value, right?  I just took that out

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Robo-Gun: My first big axe game
« Reply #71 on: November 12, 2011, 10:04:56 pm »
Try:
Code: [Select]
For(P,0,C)
If {P*2+L1+1}-Y<7+({P*2+L1+1}-Y>65529)*({P*2+L1}-X<7+({P*2+L1+1}-X>65529))
E--
End
End
Text(40,-39,"HEALTH:")   //"-" is subtract, not negative
Rect(66,-64,E/2,3)   //"-" is subtract; the third/fourth arguments are how long/wide the rectangle is, not end points
If E<1
2->N
Return
End
Also, I fixed the double If because it might help your problem


It doesn't work, It just makes your health go down when ever you aren't moving. :(
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Robo-Gun: My first big axe game
« Reply #72 on: November 12, 2011, 10:05:25 pm »
.................……………Alrighty then. I didn't really see how it worked either. I wanted to check the absolute value of the difference of the coords to find the distance.  My main problem was the rect. I think I know how to fix it nowtht I know the last arguments the width not the x2
« Last Edit: November 12, 2011, 10:11:43 pm by epic7 »

Offline chattahippie

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +27/-0
  • Super Member! :D
    • View Profile
Re: Robo-Gun: My first big axe game
« Reply #73 on: November 12, 2011, 10:11:27 pm »
Oh, I know why... let me fix... I thought I could get away with not using abs(
Code: [Select]
For(P,0,C)
If abs({P*2+L1+1}-Y<7)*abs({P*2+L1}-X<7)
E--
End
End
Text(40,-39,"HEALTH:")   //"-" is subtract, not negative
Rect(66,-64,E/2,3)   //"-" is subtract; the third/fourth arguments are how long/wide the rectangle is, not end points
If E<1
2->N
Return
End
There, try that

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Robo-Gun: My first big axe game
« Reply #74 on: November 12, 2011, 10:13:42 pm »
Negative y coordinates still are used?

It works less now :P
« Last Edit: November 12, 2011, 10:17:15 pm by epic7 »