See the ASCII map data and if you see the "A" string, thats where the enemy needs to spawn. ALSO, there is only one "A" string, so thats the only enemy. AND the "A" is the enemy.And the way to fix it is to spawn the enemies only once, or you'll run out of sprites.
Making a Shoot 'Em Up Game, but still with some doubts.
Root / Programming Questions / [.]
the_squat1115Created:
I don't understand what you're trying to say.I mean, I put a tile check on the MAPRENDER loop, so it checks if there is any "A" string, which means it detected an enemy, so, instead of reading the "A" string as a tile, it tells the ASCII reader to stop reading the map and letting the tile-check to do his work, the enemy generating, but, when it finishes spawning the enemy, it simply ignores the position of the "A" string, so it puts the enemy instead of centering it on the position that the ASCII map defined, it just puts the sprite on its default position. Thats my problem.
That's because you need to use SPOFS Just use the map tile coordinates you would use for BGPUT multiplied by 16.Thanks But how do I determine the coords. used by BGPUT?
Oh, thanks, so, the variables I used in the FOR loops are the BGTABLE and MAP$ just multiplied by 16? Got it. EDIT: I've multiplied those MAP$ and BGTABLE variables by 16, but now, SmileBASIC spams with this:Like I said, it's just the ones you used in BGPUT, or in other words the FOR loop variables.That's because you need to use SPOFS Just use the map tile coordinates you would use for BGPUT multiplied by 16.Thanks But how do I determine the coords. used by BGPUT?
Syntax error in 0:69(SPOFS:1)And when I put the SPOFS J#,I#, comes with an Out of range error:
Out of range in 0:69(SPOFS:1)Actually, I don't know if this is normal, or a bug from SB, but, if it's not, there may be a solution.
No, it's not those. It's the variables that the FOR loop changes, I and J.And how the heck do I determine them?
They are already determined because of the FOR loop. That's how FOR loops work. Oh also, you're still spawning the enemy too much. You should only spawn it on one frame, or at the exact time that it should come on screen.So, I just need to put SPOFS I#,I#?
nonono 1. You used I# twice 2. you need to multiply them by 16 to match the tile coordinatesThey are already determined because of the FOR loop. That's how FOR loops work. Oh also, you're still spawning the enemy too much. You should only spawn it on one frame, or at the exact time that it should come on screen.So, I just need to put SPOFS I#,I#?
Thanks! I had finally managed to do that, just that I didn't know how do I certainly position correctly the sprite, but there is another problem I have (I don't want to push you, I could still figure it on my own, but sometimes I couldn't figure it without help), is that when I make a map too large that it gets too off-screen, I get this error: Out of range in 0:79(BGPUT:3) I had even made some little changes on the code, but still I get this error.nonono 1. You used I# twice 2. you need to multiply them by 16 to match the tile coordinatesThey are already determined because of the FOR loop. That's how FOR loops work. Oh also, you're still spawning the enemy too much. You should only spawn it on one frame, or at the exact time that it should come on screen.So, I just need to put SPOFS I#,I#?
BGSCREEN layer, map width, map height will make the map have the desired size.I did that...
How did you do it?I'll send you a screenshot And the height is the same as BGSCREEN (count them)
ugh my 3DS can't load your screenshotsTry reloading the page again