Adventure Scripts in the Platformer Module

Nintend0Nerd

New member
Hello, I'm making a platformer using the platformer module and I was wondering if there is anyway to take aspects from the adventure module, such as enemy drops and projectile attacks, and put them in the platformer module. When I imported a script from the Adventure module, it gave me a compiling error. Curious if anyone has done this or attempted it.
 

dale_coop

Moderator
Staff member
Actually some scripts used in the Platform module are the Adventure module ones.
For the particular case of monsters dropping items. I think it’s completly doable. Just need to adapt a little bit the scripts.
 

Nintend0Nerd

New member
I'm not sure how to go about adjusting the scripts, I'm not really too used to stuff like this. I managed to copy the text from the Powerup_IncreaseHeatlh.asm into the Powerup_IncreaseScore.asm and got health pickups to work. I tried the same for money by copying the Powerup_IncreaseMoney.asm text into the Powerup_Blank.asm but I got a compiling error.
 

Nintend0Nerd

New member
Okay, so I tried adding the spawn projectile script to the script settings. At first, it wouldn't let me save my game because of an invalid name. So I re entered in the spawn projectile script, gave it a name, and a description, and then I could save the project again. However, when I try to export and test, I get "GameData/CodeTargets.asm(58): Illegal instruction" in the command prompt. How to I get it to accept the press b to spawn projectile script in the platformer module?
 

dale_coop

Moderator
Staff member
In fact, you need to assign the powerup scripts you want to use to the Power Up "script define" corresponding.

In NESMaker, the "Health Pickup" object corresponds to "Power Up 00", the "Charge Pickup" object to "Power Up 01", the "Key Pickup" to the "Power Up 02" and the "Currency Pickup" to "Power Up 03".
So, in the "Project settings > Script settings", select the "Power Up 00", you would see that it's currently assigned to "Powerup_IncreaseScore.asm". On the right part of the windows, you have to navigate to "UserScripts\PlatformGame_Base\PowerUpCode\" and double-click on the "Powerup_IncreaseHealth.asm" to assign it to the "Power Up 00".
Script_settings.png

And reproduce the same for the other ones you need.
 

dale_coop

Moderator
Staff member
Did you watch the tutorial video?
I would suggest to watch it again, and follow the instructions at the same time.
 

dale_coop

Moderator
Staff member
If you want to add scripts for your input (controller inputs / buttons), like your projectile script, you need to go to "Scripts > Input scripts" and it from there.
 

Nintend0Nerd

New member
Thanks! I got it figured out. I got my player to shoot projectiles in the platformer module! A few other questions though.

1. When I attack, it is defaulting to my jumping animation. I assume that's because jumping takes up the slot that attacking would in an adventure game. How would I make it identify an attack animation in a different slot?

2. Is there anyway I can make it so that my character can throw a projectile while he is jumping?

3. My projectiles are still using the player palette, even though I've assigned them to the sub palette.

I really appreciate you answering my questions! I've been fiddling with this all afternoon, it isn't like I've just come here without trying things out for myself. I try to only ask when I need to.
 

TurtleRescueNES

Active member
I can't answer the first two, but I think I can help with the third. Make sure that your projectile object is using sub palette #2. As in, the second set of colors is highlighted. Regardless of what set of colors you have assigned your projectile object's palettes 1 and 2, all that the game cares about is if it is using either 1 or 2. The player object is what really controls the colors that will appear in palettes 1 and 2.

I hope all that makes some sense.
 

Nintend0Nerd

New member
Cool, got that working. Thanks! I had it set to the sub palette in the projectile menu, but didn't have it set as the sub palette on the player page.
 

dale_coop

Moderator
Staff member
For your projectile script... you should use the "shootWeapon.asm" script (it's a platform input script, more adapted for this module)
 

dale_coop

Moderator
Staff member
No, your questions are not stupid... see there is another topic about that, here:
http://nesmakers.com/viewtopic.php?f=28&t=747
 

Nintend0Nerd

New member
So I followed the instructions in the forum link you sent me to get the broken Platformer Projectiles working. I got up to post seven on that thread and I've hit a bit of a roadblock. I think something's happening, since when I repeatedly press the shoot button the game gets laggy. However, nothing is showing up and I've shot directly in front of an enemy and it hasn't damaged it.
 
Top Bottom