[4.5.6] Shooter project - projectile source

Djeez

New member
Hi everyone,

After a year of following tutorials and an unfinished Byte-Off tentative, I finally took time to dig in and begin a shooter project for my son to play.
The new tutorials are really well made and easy to follow but jeez, making a game is still hard!

I'm stuck with a problem I don't get : I'm using "Melee" for my player weapon as in the tutorial and I changed the coordinates of the weapon to make the bubble come out of the turtle's mouth.
But when I test the weapon in-game, the bubble is coming out of the turtle's shell above the head. (see attached files)

How can I change that? Thanks a lot for your help!
Have a great day
 

Attachments

  • Bubble set.png
    Bubble set.png
    57.8 KB · Views: 19
  • In-game bubble.png
    In-game bubble.png
    19.8 KB · Views: 20

dale_coop

Moderator
Staff member
In the shooter input script, you will find the code corresponding to the origin point of the projectile... something like:
Code:
        LDA Object_x_hi,x
            CLC
        ADC #$04
        STA tempA
        LDA Object_y_hi,x
        CLC
        ADC #$04
        STA tempB

Try to modify the first "ADC #$04" (corresponding to the horizontal position offset) to something like "#$10" (or maybe greater.. "#$12" or "#$13" ...) to match to the desired position.
(And the 2nd "ADC #$04" is for the vertical position offset... you can slightly modify it to adjust the vertical position of the projectile, if needed).

Yeah, those new scripts don't use the Player Offset settings (from the UI)... but it should be also easy to modify the script to use those settings instead of hard coded values in the input scripts.
 
  • Like
Reactions: jim
Top Bottom