Create Projectile doesn't work in platform module?

dale_coop

Moderator
Staff member
I copied you script, and use it... works well for me.
You have no projectile at all (when you press the button)?

How did you declared/initialized the limitProjectiles variable?
Could you share your modifications (scripts, screenshots, ...)?
 

ZeGGamer1

New member
I declared it with the user variables. I'm going to retry the process again, just in case
 

Attachments

  • limitProjectile.png
    limitProjectile.png
    8.9 KB · Views: 1,582

dale_coop

Moderator
Staff member
You didn't add LDA #$00 STA limitProjectile anywhere in the code, right? (in initLoads.asm or any other asm script)

And the script is assigned to your press button, right?
And your "Projectile" game object is set (as projectile, speed, acceleration, ...)?
 

ZeGGamer1

New member
You are an NES god. I was using the melee object, not the projectile one (I fell like an idiot). Thanks so much!

PS, where did you learn to do assembly and all of the coding, I'm really curious.
 

dale_coop

Moderator
Staff member
ZeGGamer1 said:
You are an NES god. I was using the melee object, not the projectile one (I fell like an idiot). Thanks so much!

Ah ah, yes, I did that kind of mistake at first too ;) don't worry we were (still are) all beginners here.

ZeGGamer1 said:
PS, where did you learn to do assembly and all of the coding, I'm really curious.

I learned asm code, here, with NESMaker 8 months ago. I followed Joe's tutorial about NESMaker, on vimeo: https://vimeo.com/joegranatoiv
and those on youtube : https://www.youtube.com/channel/UCrGvkDImwWQxWyTOo6r3Pyw
It's very fun to code with NESMaker (you can see --or not see-- the result immediately).
 

ZeGGamer1

New member
ok, so one last thing. The bullets shoot normal, but when they hit an enemy, the game freezes up?
 

Attachments

  • ScreenRecorderProject16.gif
    ScreenRecorderProject16.gif
    6.4 MB · Views: 1,563

dale_coop

Moderator
Staff member
It might be the PlaySound that freezes the game...
You could try this fix: http://nesmakers.com/viewtopic.php?p=7638#p7638
 

ZeGGamer1

New member
I don't know, I tried doing that but I just got an endless string of messages telling me that variables were undefined when I added them to my input scripts.
 

dale_coop

Moderator
Staff member
Try again, it will work:
1) modify the "Variables\ZP_and_vars.asm" script, commenting out the line 238 (put a ;; before):
Code:
	;;SongToPlay		.dsb 1

2) modify the "LoadScreenData.asm" script, line 324 and line 452, replacing:
Code:
	STA SongToPlay
with:
Code:
	STA songToPlay
(see the small difference of removing the caps)

3) modify the "HandleScreenLoads.asm" script, line 368, replacing:
Code:
	STA SongToPlay
with:
Code:
	STA songToPlay

That should be ok. Save all the scripts and...
Export & test ;)
 

ZeGGamer1

New member
Ok, I followed your instructions but I still get the error of "Label already defined" in the

Routine\system\ggsound_zp.inc
Routine\Variables\ZP_and_vars.asm
Routine\Variables\SystemVariables.asm
Routine\Variables\UserVariables.asm
Routine\system\HandleScreenLoadss.asm

I'm not sure if i'm putting the scrips in the right place, IE the input scripts section, or if it is something else entirely.
 

dale_coop

Moderator
Staff member
Don’t add any script here (they are already used linked to the project), just modify the content of the scripts, in the folder (open them with notepad or notepad++,...) to make the modifications.
 

DanielT1985

Member
Redherring32 said:
DanielT1985 said:
dale_coop said:
Yes it’s exactly that ;)

So I got my character's projectile to me at the vertical position, but what about the horizontal position. When I shoot right, it's near the player but not near enough, and when I shoot left, it's far away from the player. I want it to me near my character to make it act like a fist. (The rock sprite is a placeholder, btw.)

SxwJOKo.gif

Sweet animations!
How'd you get his hat to move slightly when he walks?

It's thanks to the walking sprites. One sprite makes it stay in place, and the other makes it bounce up a bit.
 

dale_coop

Moderator
Staff member
Have you made the modifications needed in the scripts (commenting out in ZP_and_vars.asm and rename the 2 others)?
 

dale_coop

Moderator
Staff member
Strange, it's still freezing...
Could you share the content of your PlatformGame_Base\HurtWinLoseDeath\Platform_HandleHurtMonster.asm script?
 

dale_coop

Moderator
Staff member
Ok.
Else, to check if the issue is the SFX playsound code...
You could try to comment out the "PlaySound SFX_MONSTER_HURT", line 72 (putting a ";" before the line), to see if you still have the problem of freeze.
(All those problems would probably be fixed in the 4.1)
 
Top Bottom