Topic: Where I can get the Sonic, Tails and Knuckles scripts?

Hello, I used to play the Open Sonic 0.1.4 and I would like to achieve this three characters into Open Surge 0.2.0. smile

Re: Where I can get the Sonic, Tails and Knuckles scripts?

Open Surge is old project. You need to make.

Last edited by MatheusRRR (2016-04-15 22:55:34)

Re: Where I can get the Sonic, Tails and Knuckles scripts?

Dabura's Hitman wrote:

Hello, I used to play the Open Sonic 0.1.4 and I would like to achieve this three characters into Open Surge 0.2.0. smile

here you step one of my skills created by me for Sonic, Tails and Knuckles are not 100% as the Open Sonic ... but I try to improve their skills

object ".Sonic Companion"
{
    requires 0.2.0
    always_active
    state "main"
    {
       create_child ".Sonic: Spin Dash"
       create_child ".Sonic: Homing Attack"
       create_child ".Sonic: Super Peel Out"
       destroy
    }
}

// Skills by other Sonic games
object ".Sonic: Homing Attack"
{
    requires 0.2.0    
    always_active
    state "main"
    {
        observe_player "Sonic"
        on_player_jump "Get ready for Lightning"
    }
    state "Get ready for Lightning"
    {
        on_button_pressed "fire1" "dash direction"
        on_player_jump "Get ready for Lightning"
        change_state "main"
    }
    state "dash direction"
    {
        play_sample "samples/Dash.ogg"
        set_player_xspeed "player_direction() * 790"
        change_state "Dash"
    }
    state "Dash"
    {
        create_child ".Sonic: Dash Aftereffect" "player_xpos() - (player_direction() * 3)" "player_ypos() + 17"
        set_animation "SD_SONIC" 9
        on_timeout 0.1 "stop"
    }    
    state "stop"
    {
        on_player_in_the_air "stop"
        change_state "main"
    }
}

object ".Sonic: Dash Aftereffect"
{
    always_active
    requires 0.2.0
    state "main"
    {
        set_alpha 0.5
        look_at_player
        set_animation "SD_SONIC" 9
        on_timeout 0.2 "destroy"
    }
    state "destroy"
    {
        destroy
    }
}

// Sonic CD, Sonic 2 and Sonic 3 & Knuckles Skills
object ".Sonic: Spin Dash"
{
    requires 0.2.0
    always_active

    state "main"
    {
        hide
        observe_player "Sonic"
        change_state "stand by"
    }

    state "stand by"
    {
        on_player_duck "duck"
    }

    state "duck"
    {
        let "$p = 0"
        on_button_pressed "fire1" "charge"
        on_player_duck "duck"
        change_state "stand by"
    }

    state "charge"
    {
        set_player_animation "SD_SONIC" "10"
        strong_player
        springfy_player
        disable_player_movement
        play_sample "charge"
        let "$p = min($p+2, 8)"
        change_state "hold"
    }

    state "hold"
    {
        set_player_animation "SD_SONIC" "10"
        attach_to_player 0 20
        on_player_gethit "cancel"

        let "$p -= 0.234 * floor(8*$p) * dt()"
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        on_button_pressed "fire1" "charge"
        on_button_down "down" "hold"
        change_state "release"
    }

    state "cancel"
    {
        enable_player_movement
        weak_player
        change_state "stand by"
    }

    state "release"
    {
        play_sample "release"
        enable_player_movement
        weak_player
        set_player_xspeed "(480 + 30 * floor($p)) * player_direction()"
        roll_player
        change_state "stand by"
    }
}

// Sonic CD Skills
object ".Sonic: Super Peel Out"
{
    requires 0.2.0
    always_active

    state "main"
    {
        hide
        observe_player "Sonic"
        change_state "stand by"
    }

    state "stand by"
    {
        on_player_lookup "ready"
    }

    state "ready"
    {
        let "$p = 0"
        on_button_pressed "fire1" "charge"
        on_player_lookup "ready"
        change_state "stand by"
    }

    state "charge"
    {
        set_player_animation "SD_SONIC" "13"
        springfy_player
        disable_player_movement
        play_sample "charge"
        let "$p = min($p+2, 8)"
        change_state "hold"
    }

    state "hold"
    {
        set_player_animation "SD_SONIC" "13"
        attach_to_player 0 20
        on_player_gethit "cancel"

        let "$p -= 0.234 * floor(8*$p) * dt()"
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        on_button_pressed "fire1" "charge"
        on_button_down "up" "hold"
        change_state "release"
    }

    state "cancel"
    {
        enable_player_movement
        change_state "stand by"
    }

    state "release"
    {
        play_sample "release"
        enable_player_movement
        simulate_button_up "left"
        set_player_xspeed "(1000) * player_direction()"
        change_state "stand by"
    }
}
object ".Tails Companion"
{
    requires 0.2.0
    always_active

    state "main"
    {
        create_child ".Tails Spin Dash"
        create_child ".Tails Fly"
        create_child ".Tails Swim"
        destroy
    }
}

// Sonic 2, Sonic 3 & Kncukles and Sonic CD 2011 Skills
object ".Tails Spin Dash"
{
    requires 0.2.0
    always_active

    state "main"
    {
        hide
        observe_player "Tails"
        change_state "stand by"
    }

    state "stand by"
    {
        on_player_duck "duck"
    }

    state "duck"
    {
        let "$p = 0"
        on_button_pressed "fire1" "charge"
        on_player_duck "duck"
        change_state "stand by"
    }

    state "charge"
    {
        set_player_animation "SD_TAILS" 8
        strong_player
        springfy_player
        disable_player_movement
        play_sample "charge"
        let "$p = min($p+2, 8)"
        change_state "hold"
    }

    state "hold"
    {
        set_player_animation "SD_TAILS" 8
        attach_to_player 0 20
        on_player_gethit "cancel"

        let "$p -= 0.234 * floor(8*$p) * dt()"
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        on_button_pressed "fire1" "charge"
        on_button_down "down" "hold"
        change_state "release"
    }

    state "cancel"
    {
        enable_player_movement
        weak_player
        change_state "stand by"
    }

    state "release"
    {
        play_sample "release"
        enable_player_movement
        weak_player
        set_player_xspeed "(480 + 30 * floor($p)) * player_direction()"
        roll_player
        change_state "stand by"
    }
}

// Sonic 3 & Kncukles and Sonic CD 2011 Skills
object ".Tails Fly" 
{
    requires 0.2.0
    always_active

    state "main"
    {
        hide
        observe_player "Tails"
        change_state "stand by"
    }

    state "stand by"
    {
        // STOP ALL SOUNDS!
        let "$looptime = 0"
        let "$volumetime = 0.0"
        stop_sample "samples/Tails Fly 1.ogg"
        stop_sample "samples/Tails Fly 1.ogg"
        stop_sample "samples/Tails Fly 1.ogg"
        stop_sample "samples/Tails Fly 1.ogg"
        stop_sample "samples/Tails Fly 2.ogg"
        stop_sample "samples/Tails Fly 2.ogg"
        stop_sample "samples/Tails Fly 2.ogg"
        stop_sample "samples/Tails Fly 2.ogg"

        on_player_jump "jump"
    }

    state "jump"
    {
        on_button_pressed "fire1" "fly sound"
        on_player_jump "jump"
        change_state "stand by"
    }

    state "fly sound"
    {
        // Create the "Fly" sound
        let "$looptime = -1"
        let "$volumetime = 1.0"
        play_sample "samples/Tails Fly 1.ogg" "$volumetime" "0.0" "1.0" "$looptime"
        change_state "fly"
    }    

    state "fly"
    {
        set_player_yspeed -150
        set_player_animation "SD_TAILS" 19
        on_player_stop "main"
        on_player_walk "main"
        on_player_run "main"
        on_player_spring "main"
        on_player_gethit "main"
        on_player_brake "main"
        on_player_ledge "main"
        on_player_drown "main"
        on_player_win "main"
        on_player_breathe "main"
        on_player_death "main"
        on_timeout 10.0 "tired (sound)"
        on_button_down "fire1" "fly"
        change_state "fly (descend)"
    }    

    state "fly (descend)"
    {
        set_player_yspeed 150
        set_player_animation "SD_TAILS" 19
        on_button_pressed "fire1" "fly"

        on_player_stop "main"
        on_player_walk "main"
        on_player_run "main"
        on_player_spring "main"
        on_player_gethit "main"
        on_player_brake "main"
        on_player_ledge "main"
        on_player_drown "main"
        on_player_win "main"
        on_player_breathe "main"
        on_player_death "main"

        on_timeout 10.0 "tired (sound)"
    }    

    state "tired (sound)"
    {
        let "$looptime = -0"
        let "$volumetime = 0.0"
        stop_sample "samples/Tails Fly 1.ogg"
        stop_sample "samples/Tails Fly 1.ogg"
        stop_sample "samples/Tails Fly 1.ogg"
        stop_sample "samples/Tails Fly 1.ogg"

        // Create the "Tired of Fly" sound
        let "$looptime = -1"
        let "$volumetime = 1.0"
        play_sample "samples/Tails Fly 2.ogg" "$volumetime" "0.0" "1.0" "$looptime"
        change_state "tired"
    }

    state "tired"
    {
        set_player_yspeed 150
        set_player_animation "SD_TAILS" 20
        on_player_stop "main"
        on_player_walk "main"
        on_player_run "main"
        on_player_spring "main"
        on_player_gethit "main"
        on_player_brake "main"
        on_player_ledge "main"
        on_player_drown "main"
        on_player_win "main"
        on_player_breathe "main"
        on_player_death "main"
    }    
}

// Sonic 3 & Kncukles and Sonic CD 2011 Skills
object ".Tails Swim" 
{
    requires 0.2.0
    always_active

    state "main"
    {
        hide
        observe_player "Tails"
        on_player_underwater "stand by"
    }

    state "stand by"
    {
        // STOP ALL SOUNDS!
        let "$looptime = 0"
        let "$volumetime = 0.0"
        stop_sample "samples/Tails Fly 1.ogg"
        stop_sample "samples/Tails Fly 1.ogg"
        stop_sample "samples/Tails Fly 1.ogg"
        stop_sample "samples/Tails Fly 1.ogg"
        stop_sample "samples/Tails Fly 2.ogg"
        stop_sample "samples/Tails Fly 2.ogg"
        stop_sample "samples/Tails Fly 2.ogg"
        stop_sample "samples/Tails Fly 2.ogg"

        on_player_jump "jump"
        change_state "main"
    }

    state "jump"
    {
        on_button_pressed "fire1" "swim"
        on_player_jump "jump"
        change_state "main"
    }

    state "swim"
    {
        set_player_yspeed -150
        set_player_animation "SD_TAILS" 21
        on_player_stop "main"
        on_player_walk "main"
        on_player_run "main"
        on_player_spring "main"
        on_player_gethit "main"
        on_player_brake "main"
        on_player_ledge "main"
        on_player_drown "main"
        on_player_win "main"
        on_player_breathe "main"
        on_player_death "main"
        on_button_down "fire1" "swim"
        change_state "tired"
    }    

    state "tired"
    {
        set_player_yspeed 150
        set_player_animation "SD_TAILS" 22
        on_player_stop "main"
        on_player_walk "main"
        on_player_run "main"
        on_player_spring "main"
        on_player_gethit "main"
        on_player_brake "main"
        on_player_ledge "main"
        on_player_drown "main"
        on_player_win "main"
        on_player_breathe "main"
        on_player_death "main"
    }    
}
object ".Knuckles Companion"
{
    requires 0.2.0
    always_active
    state "main"
    {
       create_child ".Knuckles: Attack"
       create_child ".Knuckles: Planning"
       create_child ".Knuckles: Spin Dash"
       destroy
    }
}

// My Skill
object ".Knuckles: Attack"
{
    requires 0.2.0
    always_active
    state "main"
    {
        hide
        weak_player
        enable_player_movement
        observe_player "Knuckles"
        change_state "Stand By"
    }

    state "Stand By"
    {
        on_player_stop "press ctrl button"
    }

    state "press ctrl button"
    {
        on_button_pressed "fire2" "attack"
        on_player_stop "press ctrl button"
        change_state "main"
    }

    state "attack"
    {
        strong_player
        disable_player_movement
        set_player_animation "SD_KNUCKLES" 31
        on_player_walk "main"
        on_player_run "main"
        on_player_spring "main"
        on_player_push "main"
        on_player_gethit "main"
        on_player_brake "main"
        on_player_ledge "main"
        on_player_drown "main"
        on_player_duck "main"
        on_player_lookup "main"
        on_player_win "main"
        on_player_breathe "main"
        on_timeout 0.5 "main"
    }
}

// Sonic 3 & Knuckles Skills
object ".Knuckles: Planning"
{
    requires 0.2.0
    always_active
    state "main"
    {
        hide
        observe_player "Knuckles"
        on_player_jump "press spacebar button"
    }
    state "press spacebar button"
    {
        on_button_pressed "fire1" "planning"
        on_player_jump "press spacebar button"
        change_state "main"
    }
    state "planning"
    {
        strong_player
        set_player_yspeed 50
        set_player_animation "SD_KNUCKLES" 7
        on_player_stop "main"
        on_player_walk "main"
        on_player_run "main"
        on_player_spring "main"
        on_player_push "main"
        on_player_gethit "main"
        on_player_brake "main"
        on_player_ledge "main"
        on_player_drown "main"
        on_player_duck "main"
        on_player_lookup "main"
        on_player_wait "main"
        on_player_win "main"
        on_player_breathe "main"
        on_player_death "main"
        on_button_down "fire1" "planning"
        change_state "falling"
    }
    state "falling"
    {
        gravity
        weak_player
        set_player_animation "SD_KNUCKLES" 13
        on_player_stop "main"
        on_player_walk "main"
        on_player_run "main"
        on_player_spring "main"
        on_player_push "main"
        on_player_gethit "main"
        on_player_brake "main"
        on_player_ledge "main"
        on_player_drown "main"
        on_player_duck "main"
        on_player_lookup "main"
        on_player_wait "main"
        on_player_win "main"
        on_player_breathe "main"
        on_player_death "main"
    }
}

// Sonic 3 & Knuckles Skills
object ".Knuckles: Spin Dash"
{
    requires 0.2.0
    always_active

    state "main"
    {
        hide
        observe_player "Knuckles"
        change_state "stand by"
    }

    state "stand by"
    {
        on_player_duck "duck"
    }

    state "duck"
    {
        let "$p = 0"
        on_button_pressed "fire1" "charge"
        on_player_duck "duck"
        change_state "stand by"
    }

    state "charge"
    {
        set_player_animation "SD_KNUCKLES" "16"
        strong_player
        springfy_player
        disable_player_movement
        play_sample "charge"
        let "$p = min($p+2, 8)"
        change_state "hold"
    }

    state "hold"
    {
        set_player_animation "SD_KNUCKLES" "16"
        attach_to_player 0 20
        on_player_gethit "cancel"

        let "$p -= 0.234 * floor(8*$p) * dt()"
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        on_button_pressed "fire1" "charge"
        on_button_down "down" "hold"
        change_state "release"
    }

    state "cancel"
    {
        enable_player_movement
        weak_player
        change_state "stand by"
    }

    state "release"
    {
        play_sample "release"
        enable_player_movement
        weak_player
        set_player_xspeed "(480 + 30 * floor($p)) * player_direction()"
        roll_player
        change_state "stand by"
    }
}

Hope this can help you big_smile

hewe go!

http://1.bp.blogspot.com/-DhIBWVALM1E/VL-9jSLZggI/AAAAAAAA0no/RYn7-QXUWR4/s1600/4414464_60x60.png

Re: Where I can get the Sonic, Tails and Knuckles scripts?

Also there's  topics for this in the Game Assets section. You can find some Tails and Knuckles scripts there.

Piece of cake...!

Re: Where I can get the Sonic, Tails and Knuckles scripts?

Sorry for so long unanswered, thanks to all!!!