? SPHITSP problem (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password
What's going on?? See: Site Update March 2022

SPHITSP problem

  • #1 ✎ 9 UndergroundClay Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Good Page Hidden Achievements I'm having a problem with my game with SPHITSP. I have SPCOL and the SPHITSP right but it won't work. I was wondering if one you were willing to download my game real quick and help me find the problem. IF ANSWER==TRUE THEN ? "Thank You!" ENDIF Posted Edited by UndergroundClay
  • #2 ✎ 341 Minxrod Third Year My account is over 3 years old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength QSP Contest 2 Contest Participant I participated in the second SmileBASIC Source QSP Contest! Er, I don't know what to download? Unidentified variable error in 844:1 OK Posted Edited by Minxrod
  • #3 ✎ 9 UndergroundClay Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Good Page Hidden Achievements I'll send it to you in a private message if you're up to it. Posted
  • #4 ✎ 341 Minxrod Third Year My account is over 3 years old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength QSP Contest 2 Contest Participant I participated in the second SmileBASIC Source QSP Contest! Ok. I think I know the problem: Code structure. You call @SPRITES, and it checks collision ONLY when the line is being run, not continuously. You need to move the collision code into the loops somewhere (maybe make an @collision) and put the IF SPHITSP code there. The code itself looks fine. EDIT: The pick disappears before it can detect collision, so it will not work. You would have to put the collision check into the axe code. Also, the axe code is REALLY messy. Posted Edited by Minxrod
  • #5 ✎ 9 UndergroundClay Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Good Page Hidden Achievements Ah, ok. How would I be able to fix the axe? EDIT: I guess WAIT stops everything then xP Posted Edited by UndergroundClay
  • #6 ✎ 341 Minxrod Third Year My account is over 3 years old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength QSP Contest 2 Contest Participant I participated in the second SmileBASIC Source QSP Contest! WAIT isn't the problem, although it is usually not a good idea. To fix the axe, separate your collision IF into a separate label, like @COLLISION, and after displaying the axe, right after the IF, you can call the label. It worked when I tried it. Posted
  • #7 ✎ 9 UndergroundClay Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Good Page Hidden Achievements So type... @COLLISION (all of the axe code here) (Rock SPHITSP) RETURN Right? Posted
  • #8 ✎ 341 Minxrod Third Year My account is over 3 years old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength QSP Contest 2 Contest Participant I participated in the second SmileBASIC Source QSP Contest! What I used: @COLLISION (IF SPHITSP stuff) RETURN And just insert a GOSUB @COLLISION after all WAIT 20s What it does is check for collisions, just before removing the axe. That way both sprites are there for it to compare with. Posted Edited by Minxrod
  • #9 ✎ 9 UndergroundClay Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Good Page Hidden Achievements Oooooh so after the Waits, do GOSUB @COLLISION. lemmie try it Posted
  • #10 ✎ 9 UndergroundClay Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Good Page Hidden Achievements FINALLY THANK YOU SO MUCH! Now, one more question, is there any way I can duplicate a sprite having the same sprite collision as the first one without making another SPSET? Posted
  • #11 ✎ 341 Minxrod Third Year My account is over 3 years old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength QSP Contest 2 Contest Participant I participated in the second SmileBASIC Source QSP Contest!
    FINALLY THANK YOU SO MUCH! Now, one more question, is there any way I can duplicate a sprite having the same sprite collision as the first one without making another SPSET?
    You need two sprites, so you will need another SPSET. And SPCOL etc. You should look into a FOR loop for some of your code.
    Posted
  • #12 ✎ 9 UndergroundClay Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Good Page Hidden Achievements How does FOR work? Isnt WHEN the same thing or no? Btw can I respawn the rock somehow? Posted
  • #13 ✎ 246 Avery First Week Joined in the very first week of SmileBASIC Source Website Third Year My account is over 3 years old Website Disguised Hidden Website FOR (Variable to count with)=(Number to start on) TO (Number to end on) Posted
  • #14 ✎ 9 UndergroundClay Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Good Page Hidden Achievements I see, thanks! Posted