Bucket Mouse
Active member
If you pull out your Melee Weapon in the Adventure module, then quickly change directions (as players tend to do when dodging enemy fire), the weapon will hang there in midair for the duration of the attack time, without you. This obviously looks bad. Joe mentions it in the tutorial videos and offers a theory on how to fix it, but stops short of telling you specifically how.
I don't know why anyone would want this in their game, so here is the fix.
Open doDrawSprites and toward the bottom, right after "doneDrawingThisSprite," throw this in:
There, problem over.
Take note of where I've marked "Attacking." In my game I have it set to Action Step 02 (the third action). If you have your attack set to a different step, you should change the number to whatever yours is.
I don't know why anyone would want this in their game, so here is the fix.
Open doDrawSprites and toward the bottom, right after "doneDrawingThisSprite," throw this in:
Code:
;;; THIS ADDED PART KEEPS THE MELEE WEAPON FROM STAYING ONSCREEN ONCE THE PLAYER SPRITE MOVES
LDA Object_flags,x
AND #%00000100
BNE +isWeapon
JMP +isNotWeapon
+isWeapon
LDA Object_type,x
CMP #$01 ; attacking
BEQ +isNotProjectile
JMP +isNotWeapon
+isNotProjectile
TXA
TAY
GetActionStep player1_object
CMP #$01 ; attacking
BNE +isNotWeapon
TYA
TAX
DestroyObject
+isNotWeapon
;;;; END OF ADDED PART
There, problem over.
Take note of where I've marked "Attacking." In my game I have it set to Action Step 02 (the third action). If you have your attack set to a different step, you should change the number to whatever yours is.
Last edited: