Topic: Character moveset

Does anyone know where the characters moveset folder would be located?

thx big_smile


nvm

I found it in imput.def now all I need to find is the spindash command, and I have no idea how I am going to do that, could you help?

thx big_smile

Last edited by Loilkas (2014-02-22 14:17:48)

Dead account. YEAH

Re: Character moveset

I think the spindash is actually a sequence of three commands
(usually down, fire 1, up), and the input.def just says which key
or joystick button maps to those commands. hmm

What exactly are you trying to do?

-- svgmovement

Re: Character moveset

Just make another spindash but instead you have to press up instead of down...
Kinda like the super peel out big_smile

Dead account. YEAH

Re: Character moveset

speaking about move sets can u make a command for a gun (e.g. the megabuster from megaman)?

Re: Character moveset

I think you need object scripting for that.

-- svgmovement

Re: Character moveset

studying the Object API in the wiki and reading a few object scripts would be a start. there are no commands to give guns, and input.def only says which keys the game uses. the actual spindash is an object that reads input ofr "down" and "fire1" and then does something to the player. But like i said, you'll only understand if you look at the documentation and see how objects are made.

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: Character moveset

The actual code for the spindash is located in a character's companion file as shown below

object ".surge_spindash_controller"
{
    requires 0.2.0
    always_active

    state "main"
    {
        hide
        observe_player "Surge"
        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_SURGE" "6"
        strong_player
        springfy_player // so that the camera won't go down, since the player is ducking
        disable_player_movement
        play_sample "charge"
        let "$p = min($p+2, 8)"
        change_state "hold"
    }

    state "hold"
    {
        //textout menu.small 0 0 $p
        set_player_animation "SD_SURGE" "6"
        let "$p -= 0.234 * floor(8*$p) * dt()"

        // check if there's a platform underneath the player
        attach_to_player 0 20
        unless "obstacle_exists(0,0)" "cancel"

        // create cool particles
        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

        // check if the user wants to charge more, or if we can release the player
        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"
    }
}

Each player has a certain companion file with this code in it (with variations depending to the player's graphics of course). They used to be in .inc format, but have seemed to changed to .obj format since whenever tongue

I had a lot of fun messing with this file about a little over a year ago when I was in England for a few weeks.

Loilkas wrote:

Just make another spindash but instead you have to press up instead of down...
Kinda like the super peel out big_smile

Ah, see while I was messing around with the file (about a little over a year ago when I was in England for a few weeks), I also attempted to reverse-engineer the code/script so I could do what you're trying to do now; create a super peel-out, however the way the actual procedure of the code/script works makes it impossible to create this effect in method of just reversing the control scheme due to the Engine's game physics.

Eventually it led me to making a half-assed "psuedo" peel-out where I just changed the somersault animation to a running animation. hmm

I'm sure there's another way to achieve a super peel-out-esque move, just not this way.

Re: Character moveset

Loilkas wrote:

Just make another spindash but instead you have to press up instead of down...
Kinda like the super peel out big_smile

I've already done that if your asking.

www.facebook.com/24XFSAL  Hasn't been updated anytime recently, don't bother.
I'm on SoundCloud: https://soundcloud.com/rain-new-holy - I plan to upload one soon.
Name change from 24XFSAL coming soon. Currently studying for Information Technology and Game development. (Also studying game theory in spare time.)

Re: Character moveset

aronthehedgehog wrote:
Loilkas wrote:

Just make another spindash but instead you have to press up instead of down...
Kinda like the super peel out big_smile

I've already done that if your asking.

When? And do you have a download?

Dead account. YEAH

Re: Character moveset

no but i have the code.

object ".sonic_complicated_controller"
{
    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" "2"
        strong_player
        springfy_player // so that the camera won't go down, since the player is ducking
        disable_player_movement
        play_sample "charge"
        let "$p = min($p+2, 8)"
        change_state "hold"
    }

    state "hold"
    {
        //textout menu.small 0 0 $p
        set_player_animation "SD_SONIC" "2"
        let "$p -= 0.234 * floor(8*$p) * dt()"

        // check if there's a platform underneath the player
        attach_to_player 0 20
        unless "brick_exists(0,0)" "cancel"

        // create cool particles
        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

        // check if the user wants to charge more, or if we can release the player
        on_button_pressed "fire1" "charge"
        on_button_down "up" "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 "(700 + 30 * floor($p)) * player_direction()"
        change_state "stand by"
    }
}

it's basically the same as the spindash though it's pressing the up button. big_smile

www.facebook.com/24XFSAL  Hasn't been updated anytime recently, don't bother.
I'm on SoundCloud: https://soundcloud.com/rain-new-holy - I plan to upload one soon.
Name change from 24XFSAL coming soon. Currently studying for Information Technology and Game development. (Also studying game theory in spare time.)

Re: Character moveset

aronthehedgehog wrote:

no but i have the code.

object ".sonic_complicated_controller"
{
    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" "2"
        strong_player
        springfy_player // so that the camera won't go down, since the player is ducking
        disable_player_movement
        play_sample "charge"
        let "$p = min($p+2, 8)"
        change_state "hold"
    }

    state "hold"
    {
        //textout menu.small 0 0 $p
        set_player_animation "SD_SONIC" "2"
        let "$p -= 0.234 * floor(8*$p) * dt()"

        // check if there's a platform underneath the player
        attach_to_player 0 20
        unless "brick_exists(0,0)" "cancel"

        // create cool particles
        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

        // check if the user wants to charge more, or if we can release the player
        on_button_pressed "fire1" "charge"
        on_button_down "up" "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 "(700 + 30 * floor($p)) * player_direction()"
        change_state "stand by"
    }
}

it's basically the same as the spindash though it's pressing the up button. big_smile

Can you change it to Tux? when I tried it didn't work

Dead account. YEAH

Re: Character moveset

i want to make a game using open surge that has multiple platformers to play. is that possible?

Re: Character moveset

aronthehedgehog wrote:

no but i have the code.

object ".sonic_complicated_controller"
{
    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" "2"
        strong_player
        springfy_player // so that the camera won't go down, since the player is ducking
        disable_player_movement
        play_sample "charge"
        let "$p = min($p+2, 8)"
        change_state "hold"
    }

    state "hold"
    {
        //textout menu.small 0 0 $p
        set_player_animation "SD_SONIC" "2"
        let "$p -= 0.234 * floor(8*$p) * dt()"

        // check if there's a platform underneath the player
        attach_to_player 0 20
        unless "brick_exists(0,0)" "cancel"

        // create cool particles
        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

        // check if the user wants to charge more, or if we can release the player
        on_button_pressed "fire1" "charge"
        on_button_down "up" "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 "(700 + 30 * floor($p)) * player_direction()"
        change_state "stand by"
    }
}

it's basically the same as the spindash though it's pressing the up button. big_smile


Tested it. It works.

http://i.imgur.com/XMYouH9.png

Oh wait....

http://i.imgur.com/uPfeWfy.png

he he he.... now I remember the problem. I you did the exact same thing I did; and that's what happens when you try to do that just by reversing the control scheme. The player looks like it's belly-flopping in sideways gravity.