help how to add news levels,add homing and add "s" monitors in sonic 2

Discussion in 'Discussion and Q&A Archive' started by Florian, Jul 7, 2013.

Thread Status:
Not open for further replies.
  1. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    According to the code Florian has posted to us, he already has the bits to make Sonic invincible, so looking at the "invinc. monitor" won't help you here, but I did notice something. These lines you have in your code:

    move.w #0,invincibility_time(a0)

    bset #1,status_secondary(a0); make Sonic invincible

    move.b #$81,obj_control(a0)

    move.b #$1F,anim(a0); use roll/transformation animation;1F for transform slotThese commands are in your new monitor object, right? In that case, these codes aren't affecting Sonic, but the monitor. The new monitor is at a0, not Sonic. If you stuck this code in Sonic's object, then Sonic would be a0, but as we're putting it in the monitor code, the monitor is a0. To fix this, these lines I just posted, change all the a0's to a1 like so:

    move.w #0,invincibility_time(a1)

    bset #1,status_secondary(a1); make Sonic invincible

    move.b #$81,obj_control(a1)

    move.b #$1F,anim(a1); use roll/transformation animation;1F for transform slotAnd then, just before "move.w #0,invincibility_time(a1)", add this line:

    lea (MainCharacter).w,a1 ; a1=character ; a1=SonicWhat this now does, is load's Sonic's object RAM into a1, then the commands above, will apply it to Sonic's object. He should now be invincible.
     
  2. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    thank you very much redhotsonic, it works!!!! and for hidden palace how to add it in the level select?
     
  3. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    You're welcome. General rule that 90% of the time when copying code, it won't work without a few tweaks.

    As for level select, all the pointer's can be found at Misc_9454
     
  4. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    I work on the monitor "s." I wish he turned into hypersonic. Except I do not know how to load the hyper palette (I already added).Can you help me
     
  5. fdswerty

    fdswerty Well-Known Member Member

    Joined:
    Apr 10, 2013
    Messages:
    138
    EDIT: Nevermind. Trash this post.
     
    Last edited by a moderator: Jul 9, 2013
  6. Florian

    Florian Active Member Exiled

    Joined:
    Jun 29, 2013
    Messages:
    31
    I found these lines: a line which I add hyper_sonic_palette?




    Water_Level_1 = ramaddr( $FFFFF646 )
    Water_Level_2 = ramaddr( $FFFFF648 )
    Water_Level_3 = ramaddr( $FFFFF64A )
    Water_routine = ramaddr( $FFFFF64D )
    Water_move = ramaddr( $FFFFF64E )
    Water_on = ramaddr( $FFFFF64C ) ; is set based on Water_flag
    New_Water_Level = ramaddr( $FFFFF650 )
    Water_change_speed = ramaddr( $FFFFF652 )
    Palette_frame_count = ramaddr( $FFFFF65E )
    Super_Sonic_palette = ramaddr( $FFFFF65F )
    Ctrl_2_Logical = ramaddr( $FFFFF66A ) ; 2 bytes
    Ctrl_2_Held_Logical = ramaddr( $FFFFF66A ) ; 1 byte
    Ctrl_2_Press_Logical = ramaddr( $FFFFF66B ) ; 1 byte
    Sonic_Look_delay_counter = ramaddr( $FFFFF66C ) ; 2 bytes
    Tails_Look_delay_counter = ramaddr( $FFFFF66E ) ; 2 bytes
    Super_Sonic_frame_count = ramaddr( $FFFFF670 )
    Plc_Buffer = ramaddr( $FFFFF680 ) ; Pattern load queu


    (it's my 20th post !!!!)
     
Thread Status:
Not open for further replies.