Help on respawning objects

Discussion in 'Discussion and Q&A Archive' started by redhotsonic, Dec 11, 2011.

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

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Do you mean in general? I just looked in my hack and no, he doesn't load the dust. I never noticed that, I will look into that tomorrow and will get back to you.


    EDIT: Just noticed MainMemory's post. I will have a look tomorrow, cheers, mate.


    EDIT2: Tried MM's idea and it didn't quite work with me but probably the way SMTP and I ported Knuckles in but it is in the right area. Here is how I go it to work:



    ; loc_1DE4A:
    Obj08_CheckSkid:


    movea.w parent(a0),a2 ; a2=character


    cmpi.b #$D,anim(a2) ; SonAni_Stop


    beq.s Obj08_SkidDust


    cmpi.w #$3,($FFFFFF72).w ;is it knux alone?


    beq.s knuxskidcheck


    cmpi.w #$4,($FFFFFF72).w ;is it knux&tails?


    bne.s +


    knuxskidcheck:


    cmpi.b #$20,anim(a2) ; Knux sliding?


    beq.s Obj08_SkidDust


    +


    move.b #2,routine(a0)


    move.b #0,objoff_32(a0)


    rts


    ; ===========================================================================


    ; loc_1DE64:


    Obj08_SkidDust:


    subq.b #1,objoff_32(a0)


    bpl.w loc_1DEE0


    move.b #3,objoff_32(a0)


    bsr.w SingleObjLoad


    bne.w loc_1DEE0


    move.b 0(a0),0(a1) ; load obj08


    move.w x_pos(a2),x_pos(a1)


    move.w y_pos(a2),y_pos(a1)


    addi.w #$10,y_pos(a1)


    tst.b objoff_34(a0)


    beq.s +


    subi.w #4,y_pos(a1)


    +


    cmpi.w #$3,($FFFFFF72).w ; is it knux alone?


    beq.s knuxskidcheck2


    cmpi.w #$4,($FFFFFF72).w ; is it knux&tails?


    bne.s +


    knuxskidcheck2:


    cmpi.b #$20,anim(a2) ; Knux sliding?


    bne.s +


    subi.w #$9,y_pos(a1)


    subi.w #$17,x_pos(a1)


    tst.w x_vel(a2)


    bge.s +


    add.w #$34,x_pos(a1)


    +


    move.b #0,status(a1)


    move.b #3,anim(a1)


    ;etc, etc



    I had to do a different check as comparing his object ID didn't work for some reason, and I had to edit the position and tweak with it to get it right, but now, he does make dust when sliding from giding.
     
    Last edited by a moderator: Dec 18, 2011
Thread Status:
Not open for further replies.