yuppicide Posted June 20, 2009 Share Posted June 20, 2009 I know you can do player0: and player1: to specify player graphics below. Is it possible to do something like playerx: and I'll specify if x is 0 or 1? What would I need to do this? player{x} Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted June 20, 2009 Share Posted June 20, 2009 Is it possible to do something like playerx: and I'll specify if x is 0 or 1? What would I need to do this? player{x} If I understand your question, you want to declare player data but it could be for any player, then later you want to be able to say which player the data is for. In other words, you want to declare the player data generically, and share it for both players (or either player). Yes, you can do that, but not in the way you described. There are two ways to do this: (1) Go ahead and declare the data for player0 (or player1, if you prefer). Then set the playerpointer and playerheight for the specific player you want to use the data with. (2) Declare the data using a data statement, rather than a player statement. Then set the playerpointer and playerheight for the specific player you want to use the data with. I've already posted examples of how to do the first method, and I may have posted examples of the second method, too. Just search the batari Basic forum for information about sharing player data, or sharing sprite data. And I'll work up a few more examples and post them in this thread. Michael Quote Link to comment Share on other sites More sharing options...
yuppicide Posted June 21, 2009 Author Share Posted June 21, 2009 (edited) I did a search, but so far turn up nothing but this thread lol. I'll tell you what I am trying to do.. I'm designing a demo Marquee Mark and The Funky Bunch. It's a scrolling marquee maker. The whole program resides in bank2, so you'd be free to use bank1 for your game. By just changing a few settings you'll have a title screen with scrolling letters. Settings will include: - Color - Self explanatory.. - Speed - Self explanatory.. - Scroll Type - The way your message goes across the screen.. there will be 3 or 4 different types.. such as scroll left, wavy, circles, etc. - .. and your message of course. What the program will do is have the letters stored in bank2 as playerx: statements. This way the program can set x to either 0 or 1 so it can draw two letters on a screen at a time. I could make it draw more letters at a time if I read up on those multisprite tricks I suppose, but for now just two letters. They will be evenly spaced apart. As one letter flies out of the "display area" a new letter will show up. I will have the program on "gosub h i t h e r e s e a", which would call up those routines in bank2 to draw those specific letters. I currently have made one font, but will have other fonts you can cut and paste into the code for a different look. Edited June 21, 2009 by yuppicide Quote Link to comment Share on other sites More sharing options...
RevEng Posted June 21, 2009 Share Posted June 21, 2009 Look at the "Code Snippets & Samples for bB Beginners" thread. The last example shows how to point sprites using data statements. http://www.atariage.com/forums/index.php?s...t&p=1761970 Quote Link to comment Share on other sites More sharing options...
yuppicide Posted June 21, 2009 Author Share Posted June 21, 2009 Sounds great! Thanks! Look at the "Code Snippets & Samples for bB Beginners" thread. The last example shows how to point sprites using data statements. http://www.atariage.com/forums/index.php?s...t&p=1761970 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.