Platformer No attack and other issues.

Hippokittie

Member
I have used some scripting to make the player shoot a projectile with B. When attempting to launch this to test, it tells me "GameData\CodeTargets.asm(92): Need a name." So I do not know what to do about that. There is also, without the projectile script added, issues where graphic blocks change or are wrong, monsters appear everywhere, and do nothing, as well as with a Boss character, using parts of the sprite for a smaller enemy in its place. Then, when I warp the player to a different area, no matter what X,Y chords I give it, is spawns at 0,0 and falls through solids non stop. Animations (4 frames) are taking nearly 3 minutes to play?

So many issues and I have no idea why. Followed the Tutorials for most things, aside from the actual making of art and level layouts. Not sure.
 

dale_coop

Moderator
Staff member
Check your "Scripts > input scripts" and make sure all the scripts are correct (click on each of them). Same for the scripts assigned in your Input Editor.
If something incorrect remove the script.
Don't hesitate to share screenshots
 

Hippokittie

Member
I don't know if this will help; but I have a screen shot here of the editor for one of the monsters, and in game the same section. I also included in editor view of the map piece, and the weird graphic affects going on. Don't know what other screen shots I can post? At the bottom is the code for the projectile.https://imgur.com/GpsGXSm https://imgur.com/G5glcFy https://imgur.com/ZVNclvn https://imgur.com/zmdSvee
Code:
CreateSimpleProjectileWithMotion

	LDY player1_object
	CPY #$FF
	BNE playerCanCreateProjectile
	RTS
playerCanCreateProjectile

	LDA Object_movement,y
	AND #%00000111
	TAX
	LDA weaponOffsetTableX.x
	
	CLC
	ADC Object_y_hi,y
	STA temp2
	CreateObject temp1, temp2, #$01, #$00
	LDA Object_movement,y
	AND #%00000111
	STA temp
	TAY
	LDA DirectionMovementTable,y
	ORA temp
	
	STA Object_movement,x
	
	
	LDA Object_x_hi,x
	SEC
	SBC #$08
	STA Object_x_hi,x
	LDA Object_y_hi,x
	SEC
	SBC #$08
	STA Object_y_hi,x
	
	PlaySound #$00, #$00
	RTS
 

dale_coop

Moderator
Staff member
My question was how you do you assign your projectile script to your project?
because IF you have still the same error, you might not be doing that correctly.
And in that scenario, share screenshots of "how you set your scripts".

Your error is not in the scripts, but the way you did to assign it.
 

Hippokittie

Member
Well from the tutorial, I set the object for projectile in Game Objects from the player character graphic bank and then select in the game objects section where the projectile come from. Then, using that script i posted, I apply the create projectile to button B. I set the projectile as Player weapon with destroy me on both sold and edge and have its peed and acceleration set to the 200's with 2 strength (for damage amount). In actions I set it to ignore gravity. In inputs, I set for game state MainGame Target NULL. When I manage to get it to launch and play, hitting "B" makes a weird graphic effect that fills the screen and moves around; but removes my character now haha.
 

Hippokittie

Member
Here you go. I think that maybe something is wrong with the code, as the B button when I do get it to launch uses the first cell of every file in a scrolling line that goes down.

Input Editor.
https://imgur.com/a/vTvPw3p
Side Bar showing images of projectile and weapon
https://imgur.com/l9cy48k
 

dale_coop

Moderator
Staff member
Ok... your CreateProjectileWithMotion script don't create a "Projectile" object... in fact, it creates the object called "Melee" in your Game Object list.
So maybe you haven't set that object correctly?

Also, you wrote you set the "ignore gravity" for you projectile... but have you followed the tutorial: http://nesmakers.com/viewtopic.php?f=35&t=1703
(or the one about fixing the "ignore gravity" flag http://nesmakers.com/viewtopic.php?f=35&t=1939 )
 

Hippokittie

Member
Thank you, now the shooting is working; but the random items spawning is still happening haha. Weird sprites that aren't part of the same tileset, as well as the random like floor tiles building towers and such. Still also having some issues with teleporting. As soon as I walk into a screen with a warp tile on it, it instantly warps me to 0,0 at position 0,0. Confused still; but getting everything working. :) Thank you for the projectile help. Any advise for the others?
 

dale_coop

Moderator
Staff member
Random spawning? When you shoot?

For the warp, the warp script is not correct, here's a fix: http://www.nesmakers.com/viewtopic.php?p=19824#p19824
 

Hippokittie

Member
No, when I shoot its working like it should now; but like when I walk through the level, enemies from other tile sets sprites pop up in the background, or different tiles will spawn where they shouldn't be. Like the images I posted with the boss and the other monsters where it used the wrong sprite and duplicated the monsters; but other places it spawns in background or ground tile with no collision where those tiles are not supposed to be.
 

dale_coop

Moderator
Staff member
Really need screenshots of the issues. Please.

Also, if it's a scrolling platformer... it might be your sprite zero the tis not correctly set, and maybe your monsters & game objects are not set to "Screen Extends" for the 'Edge Object Reaction".
 

Hippokittie

Member
The spawn issues seem to also now be spawning second player models? I followed the sprite zero video and the hud is working kinda; but the images below the hud are spawning from left to right haha.

Here is the editor
https://imgur.com/ZoT4LQB

Here is in game
https://imgur.com/dhZWUVo
 

dale_coop

Moderator
Staff member
You might have incorrect monsters on screens.
Try this, right click on your screen editor "Reset all placements". Then check in your screen infos that your "monster group" is correctly set. Then place again your monsters on your screen.

Also, make sure that your monster 's "Edge solid Reaction" property (in the object details dialog of your monster object) is set correctly ("screen extends" for a scrolling platformer)

About the tile glitches... it's a known problem in the SCROLLING platformer module. When you will set correctly your monsters, this issue can reduced itself (sometimes)
 

Hippokittie

Member
Working pretty well accept the weird tile spawns haha. The monster sprites are functioning like they should just look wrong. Been poking around with it and looking at the coding a bit. Not sure if the code for the loading the sprites in the code for scrolling platformer works right. For instance, when I try to make it scroll left, it just pops up the new screen. May be related to that. Will see what I can do for it. Otherwise got my game up and running; just gotta figure out like pause and level transition screens to get it finished (minus the graphic glitches) Thank you Dale!
 

dale_coop

Moderator
Staff member
your monster sprites look wrong?
You mean like it's not the correct monster graphics?
Have you set correctly the "bank" and "monster groups" in the screen details? For scrolling screens, it HAS to be the same for all your scrolling screens (I mean the one that is actually used is the ones set for the 1st screen of the scrolling screen segment).
 

Hippokittie

Member
Yeah, not the correct graphic. I tested a few things to figure out why, and it seems like I may have set the trigger day monsters to the wrong sprites by accident, so I think I got it working. Just gotta test it (hard when its boss sprites and the problem only exists when I reach the area and not spawn in the area. haha)
 

Hippokittie

Member
Okay, so I found that my monster group keeps resetting my monsters in it, unless it is filled. So I got that figured out. Have an update from poking around with the game as well. If I set the player on the normal starting screen I get the errors with tiles and extra version of the player (with collision) spawning randomly; but if I put him 1 screen into the map it fixes those errors. Not sure why that is. Also doing some poking around and messing about, I found that Some animations (like moving) will stop half way through when on the fastest speed, or wont trigger at all if set to slow. Same with the player death animation, leaving it at the fastest seems to make it slower than if I set it at 4. May be something I am doing wrong there though. I also am having some issues figuring out the "when monsters die warp to the next area" or "Unlock warp tile when monsters die" stuff. Only bypass I have to get through my game at the moment is make a warp tile and block it with a monster. It's kinda fun to poke around with it; just wish I was a stronger programmer.

Any advice on the warp or why the spawning seems to get fixed when not on the first screen?
 

dale_coop

Moderator
Staff member
On your starting screen... do a right click "reset all placements" and check your day monster group in the screen Infos dialog. Because you might have old monstes placed on that screen, those are the glitch ghost objects you see.

As explained several times in the tutorial video, the fastest speed animation is "1". The value "0" is the "almost no animation speed" value, you will usually use that one when you want no animation at all.

For the "monster lock" tiles (tiles that are unlocked when all the monster are killed), there is a tutorial topic here: http://nesmakers.com/viewtopic.php?f=40&t=1750&p=10805
 

Hippokittie

Member
Got things seemingly up and running. Thank you for all your help. Following a few Tutorials for cutscenes and pause. Once thats done, should have my game about finished. Did notice a glitch in my boss monsters not spawning if you hit the checkpoint before him; but moving where the checkpoint was seemed to fix that. Any place you can point me for Continue instead of restarting the whole game? Thank you Dale, and once I finish up the game, I will gladly post some demo stuff up :)
 
Top Bottom