Any good tutorial or steps on making Melee work?

PhoenixF2B

New member
Hey everyone,

I'm loving the software but I'm stuck at a major part. I've watched all the new tutorials for 4.1 and am using 4.1, and I've also gone through the tutorial for the Adventure mod (both the 20 minute and the 3 hour version) and there seems to be missing info on how to get Melee to work. Joe sorta skims over setting it up and just imports assets he's already made.

I've been following the tutorials and everything worked great up to that point, but I make a Melee_V and Melee_H game object, and I import the "b_create_melee" script and my game refuses to compile and gives the following errors:

Routines\Basic\ModuleScripts\InputScripts\b_create_melee.asm(56):CreateObject(36): Unknown label.
Routines\Basic\ModuleScripts\InputScripts\b_create_melee.asm(73):CreateObject(36): Unknown label.

I have been searching and reading the forums and I can only find bits of tips. There seems to be two ways to make the melee weapon, 1 by using the game object and another by referring to sprites in the tiles? Either way I can only find parts of it.

Can someone explain a start to finish method of setting up a melee sword and getting it to work in 4.1? I've been pulling my hair out for a week now.

Thanks in advance and any help is very much appreciated!
 

dale_coop

Moderator
Staff member
In the 4.1 basic modules, the melee weapon is a sprite-based weapon, not an object (like it used to be in the previous version).
Basically, a designated tile (from your GameObjectTileset) is drawn next to your Player when he's in "attacking" state (action step 03 with "invisible" set, it's the reason you can kill the enemies... not really the sword :p).

Those 2 sprites (1 for horizontal and 1 for vertical position) are defined by the SPR_WEAPON_V and SPR_WEAPON_H user constants (in the "Project Settings > User Constants".
If you count the 8x8px tiles in your tileset, you will see that your 8th and 9th are the sprites (tiles) used for your melee.
So you can change directly in your GameObjectTileset.bmp the graphics of your weapon.

If you prefer a Game object based melee weapon, I wrote a tutorial trying to bring back that system (if your feel comfortable with coding):
http://nesmakers.com/viewtopic.php?f=3&t=1777

And a good advice, use the search functionnality ;)
 
Top Bottom