(12) Creating Weapon - nroflmao/NesMakerHelp GitHub Wiki

1: Go into the "Scripts...Input Scripts" and navigate into UserScripts...AdventureGame_Base...InputScripts and add the Create Melee and create projectile scripts

image

2: Go to the Input Editor and add the input to the B button and attach to it the scribt to "create melee" as shown below:

image

3: Go to the Game Objects...Melee tab. Create new sprites and palettes if needed for the weapon using the Pixel Editor.

image

4: Click Manage Animations and create a sprite for the vertical attack sword. Define the two animation directions up and down under the "Manage Animations" tab. The "Frame Count" should be based on the same number of frames you have in the player attack animation.

image

4.A: On the Object Details dialog define set the animation types for each direction

image

4.B: On the Details tab set the player weapon check box and "Destroy Me" as the Edge Reaction.

image

4.C: on the Actions tab, set the animation speed (should match player animation speed for attack) and the end animation to "Destroy Me"

image

4.D: Set the bounding box then close the dialog and save the object.

image

5: Use the next Game Object slot to define the Melee LeftRight. Repeat similar steps as up/down only for left/right melee.

image

6: Be sure to utilize the highlighted dropdown to specify the sprite for each animation type. Add additional duplicate frames to adjust the speed of the sprite if you like.

image

7: Export and test, note that the weapon shows up in the wrong location:

image

8: Use the Game Object Tab to adjust where the weapon icon shows up:

image image

9: My final design had these settings:

image

image