"Proper" dead bodies mod... done :-)

Discussion in 'Scripting' started by yochoylamuete, Sep 21, 2004.

  1. yochoylamuete Private

    Contributions:
    39
    PREMIUM
    I Donated
    Time ago I thought it wasn't possible, but...

    (from our site)

    "Today, an old aspiration of mankind, or at least of us, mohaa players, has been acomplished. The 1936 is proud to bring you the first mod which properly makes the bodies of dead players to stay in place for the duration of the round.

    Yes, we know it was done before -by scorpiomidget-, but in our version bodies stay in the appropiate position (in the scorpio's one every dead body looked the same, and it was not a pose corresponding to death animations). In order to avoid a performance decrease on lower machines, it will be running on non-respawn modes only.

    Since it's a server-side mod, it's already running on the Official server, but it will not be publicly available until the next official release of 1936. If you're admin of a 1936 server and you're interested in adding it to your server, mail me or post a comment here."

    [IMG]
  2. Herr_Kruger Medal of Honor is not MOH

    Contributions:
    456
    Specialties:
    Mapper, Scripting, Textures, Programming, Pure Gamer
    Processing:
    Graphics:
    yochoy, i have 2 questions

    1.- is this only for BT? ....
    2.- could be any secondary problem such us lag?

    saludos,

    Herr_Kruger
  3. yochoylamuete Private

    Contributions:
    39
    PREMIUM
    I Donated
    1.- Currently it's for BT, of course, but it can be replicated on Mohaa/Spearhead, nothing special to it.

    2.- I'm not sure, but it's very possible, specially in 1936 since bodies have a lot of gear on them and weapons do also stay in place on non-respawn games (that's why it's disabled on respawn games, see the post ;) ). It can be modified to work on any gametype, by the way.

    A mandar,

    YoChoy

    P.D.: Sorry for mispelling your name on a previous post, I thought you were klaus, our chilean friend. You know, a german nickname is a german nickname after all... Sorry :)
  4. Herr_Kruger Medal of Honor is not MOH

    Contributions:
    456
    Specialties:
    Mapper, Scripting, Textures, Programming, Pure Gamer
    Processing:
    Graphics:
    hehe no problemo amigo,

    well, in that case, i am looking forward to test it on 1936 ...and of course i am even eager to try it (or adapt) on mohAA, this little weakness of mine.
    Anyway, i always liked this mod, keeps adding realism to the game, which is one of the things i look after in a mod.

    many saludos,

    Herr_Kruger
  5. yochoylamuete Private

    Contributions:
    39
    PREMIUM
    I Donated
    Then wait to see our medic implementation... I'm still polishing details of the idea, more on this later...
  6. Herr_Kruger Medal of Honor is not MOH

    Contributions:
    456
    Specialties:
    Mapper, Scripting, Textures, Programming, Pure Gamer
    Processing:
    Graphics:
    ummm dont forget to keep us informed ...sounds like more surprises coming
  7. .:RIGGS:. Daycare Member

    Contributions:
    41
    looks cool :beerbang:
  8. mefy Private

    Contributions:
    18
    Nice work... how did you get the bodies to spawn in the right pose? I was trying to do this when I started the Freeze-Tag mod because originally I was going to make it more like a medic mod, but I couldn't get it to spawn a body in the same exact spot and pose as the dead player's body.
  9. yochoylamuete Private

    Contributions:
    39
    PREMIUM
    I Donated
    Basically, you intercept the player at the moment of death, replace it with an actor, and play the appropiate death on him (actors are not removed after death, see single player game)

    Once the next version of the mod is released everyone will be able to tear it apart to see how it's done :)

    Regards,

    YoChoy
  10. Elgan Captain

    Contributions:
    310
    Specialties:
    Modeler, Scripting, Programming, Pure Gamer, Support
    Processing:
    Graphics:
    PREMIUM
    I Donated
    ohh v.clever and v.cool. wd nice work.
  11. $aT^N Private

    Contributions:
    4
    sounds awesome
  12. Massacre Private

    Contributions:
    0
    Yes i would like to run this mod for my server on spearhead, but of course there would be lagg on the server when im on it ill be kickin ass dead bodies everywhere :lol: !
  13. MPowell1944 .scr

    Contributions:
    22
    PREMIUM
    I Donated
    Yochoy, is this mod publicly available yet?
  14. yochoylamuete Private

    Contributions:
    39
    PREMIUM
    I Donated
    It is, but not as a standalone mod, I mean, it's part of 1936, which is publicly available.
  15. Gladiator Private

    Contributions:
    2
    Awesome, i been looking for this for years... is somebody working to make this for AA? If not... ill give it a go.
  16. Elgan Captain

    Contributions:
    310
    Specialties:
    Modeler, Scripting, Programming, Pure Gamer, Support
    Processing:
    Graphics:
    PREMIUM
    I Donated
    i dont think i have seen a AA version:\. Your welcome to ahve a go tho im sure:)
  17. sorridstroker Armed Forces Veteran

    Contributions:
    233
    Specialties:
    Scripting
    PREMIUM
    I Donated
    It's fairly easy to do :)

    but don't think its posible without a statefile edit.

    have a look at the killed state then you will see how to determine how the player died.

    with that info exec a script to hide the player spawn a model and play the correct anim.
  18. Gladiator Private

    Contributions:
    2
    I've had a look at it but it's a bit over my head, im still in the training fase. :eek:
  19. sorridstroker Armed Forces Veteran

    Contributions:
    233
    Specialties:
    Scripting
    PREMIUM
    I Donated
    ok..

    well here is an edited killed state i ripped out of one of my old mods..

    Code:
     
    //==============================================================================
    //
    // Death
    //
    //==============================================================================
     
    //ok rescript whole death thing to re-enable revive mode.
    state KILLED
    {
     movetype anim
     entrycommands
     {
      nextpaintime -1 // allow all pain calls to work properly for death anim selection
     }
     states
     {
      EXPLOSION_KILLED : PAIN_TYPE "explosion"
      EXPLOSION_KILLED : PAIN_TYPE "grenade"
      EXPLOSION_KILLED : PAIN_TYPE "rocket"
      KILLED_GENERIC  : default
     }
    }
     
    state KILLED_GENERIC
    {
     states
     {
      KILLED_RUNNING  : FORWARD_VELOCITY "130"
      KILLED_CROUCHING : POSITION_TYPE "crouching"
      KILLED_STANDING  : default
     }
    }
    state KILLED_RUNNING
    {
     states
     {
      DEATH_KNOCKEDUP  : PAIN_DIRECTION "front" PAIN_THRESHOLD "50" CHANCE "30"
      DEATH_CHEST  : PAIN_DIRECTION "front" PAIN_THRESHOLD "50"
      DEATH_RUN  : default
     }
    }
    state DEATH_KNOCKEDUP
    {
     action
     {    
     death_knockedup   : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     
     entrycommands
     {
     exec global/dead_body.scr "death_knockedup"
     }
    }
    state DEATH_CHEST
    {
     action
     {    
     death_chest   : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_chest"
     }
    }
    state DEATH_RUN
    {
     action
     {    
     death_run   : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_run"
     }
    }
    state KILLED_CROUCHING
    {
     states
     {
      DEATH_FRONTCROUCH : PAIN_DIRECTION "rear"
      RIFLE_PAIN_KNEESTODEATH : default
     }
    }
    state DEATH_FRONTCROUCH
    {
     action
     {    
     death_frontcrouch  : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_frontcrouch"
     }
    }
    state RIFLE_PAIN_KNEESTODEATH
    {
     action
     {    
     rifle_pain_kneestodeath  : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "rifle_pain_kneestodeath"
     }
    }
     
    state KILLED_STANDING
    {
     states
     {
      KILLED_LOWER_TORSO : PAIN_LOCATION "pelvis"
      KILLED_LOWER_TORSO : PAIN_LOCATION "torso_lower"
      KILLED_UPPER_TORSO : PAIN_LOCATION "torso_mid"
      KILLED_UPPER_TORSO : PAIN_LOCATION "torso_upper"
      KILLED_NECK  : PAIN_LOCATION "neck"
      KILLED_HEAD  : PAIN_LOCATION "head"
      KILLED_HEAD  : PAIN_LOCATION "helmet"
      KILLED_RIGHT_ARM : PAIN_LOCATION "r_arm_upper"
      KILLED_RIGHT_ARM : PAIN_LOCATION "r_arm_lower"
      KILLED_RIGHT_ARM : PAIN_LOCATION "r_hand"
      KILLED_LEFT_ARM  : PAIN_LOCATION "l_arm_upper"
      KILLED_LEFT_ARM  : PAIN_LOCATION "l_arm_lower"
      KILLED_LEFT_ARM  : PAIN_LOCATION "l_hand"
      KILLED_LEG  : PAIN_LOCATION "r_leg_upper"
      KILLED_LEG  : PAIN_LOCATION "r_leg_lower"
      KILLED_LEG  : PAIN_LOCATION "r_foot"
      KILLED_LEG  : PAIN_LOCATION "l_leg_upper"
      KILLED_LEG  : PAIN_LOCATION "l_leg_lower"
      KILLED_LEG  : PAIN_LOCATION "l_foot"
      KILLED_UPPER_TORSO : default
     }
    }
    state KILLED_LOWER_TORSO
    {
     states
     {
      DEATH_BACK  : PAIN_DIRECTION "front" CHANCE "60"
      DEATH_KNOCKEDUP  : PAIN_DIRECTION "rear" CHANCE "35"
      DEATH_RUN  : PAIN_DIRECTION "rear" CHANCE "70"
      DEATH_CROTCH  : CHANCE "60"
      DEATH_CHEST  : default
     }
    }
    state DEATH_BACK
    {
     action
     {    
     death_back  : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_back"
     }
    }
    state DEATH_CROTCH
    {
     action
     {    
     death_crotch  : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_crotch"
     }
    }
    state KILLED_UPPER_TORSO
    {
     states
     {
      DEATH_BACK  : PAIN_DIRECTION "front" CHANCE "60"
      DEATH_KNOCKEDUP  : PAIN_DIRECTION "front" CHANCE "20"
      DEATH_RUN  : PAIN_DIRECTION "rear" CHANCE "40"
      DEATH_FRONTCHOKE : CHANCE "30"
      DEATH_SHOOT  : CHANCE "60"
      DEATH_CHEST  : default
     }
    }
    state DEATH_FRONTCHOKE
    {
     action
     {    
     death_frontchoke : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_frontchoke"
     }
    }
    state DEATH_SHOOT
    {
     action
     {    
     death_shoot : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_shoot"
     }
    }
    state KILLED_NECK
    {
     
     states
     {
      DEATH_FRONTCHOKE : CHANCE "50"
      DEATH_CHOKE  : default
     }
    }
    state DEATH_CHOKE
    {
     action
     {    
     death_choke : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_choke"
     }
    }
    state KILLED_HEAD
    {
     
     states
     {
      DEATH_BACK  : PAIN_DIRECTION "front" CHANCE "50"
      DEATH_HEAD_FLYFORWARD : PAIN_DIRECTION "rear" CHANCE "30"
      DEATH_HEADPISTOL : CHANCE "20"
      DEATH_TWIST  : CHANCE "25"
      DEATH_FALL_TO_KNEES : CHANCE "50"
      DEATH_SHOOT  : CHANCE "33"
      DEATH_COLLAPSE  : default
     }
    }
    state DEATH_HEAD_FLYFORWARD
    {
     action
     {    
     death_head_flyforward : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_head_flyforward"
     }
    }
    state DEATH_HEADPISTOL
    {
     action
     {    
     death_headpistol : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_headpistol"
     }
    }
    state DEATH_TWIST
    {
     action
     {    
     death_twist : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_twist"
     }
    }
    state DEATH_FALL_TO_KNEES
    {
     action
     {    
     death_fall_to_knees : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_fall_to_knees"
     }
    }
    state DEATH_COLLAPSE
    {
     action
     {    
     death_collapse : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_collapse"
     }
    }
    state KILLED_RIGHT_ARM
    {
     states
     {
      DEATH_TWIST  : PAIN_DIRECTION "rear" CHANCE "50"
      DEATH_FALL_BACK  : CHANCE "30"
      DEATH_SHOOT  : CHANCE "50"
      DEATH_CHEST  : default
     }
    }
    state DEATH_FALL_BACK
    {
     action
     {    
     death_fall_back : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_fall_back"
     }
    }
    state KILLED_LEFT_ARM
    {
     states
     {
      DEATH_TWIST   : PAIN_DIRECTION "front" CHANCE "50"
      DEATH_FALL_BACK   : CHANCE "30"
      DEATH_SHOOT   : CHANCE "50"
      DEATH_CHEST   : default
     }
    }
    state KILLED_LEG
    {
     states
     {
      DEATH_KNOCKEDUP  : PAIN_DIRECTION "rear" CHANCE "50"
      DEATH_FALL_BACK  : CHANCE "25"
      DEATH_SHOOT  : CHANCE "33"
      DEATH_FALL_TO_KNEES : CHANCE "50"
      DEATH_CHEST  : default
     }
    }
     
    state EXPLOSION_KILLED
    {
     action
     {
      death_explosion_large : PAIN_THRESHOLD "150"
      death_explosion_back : PAIN_DIRECTION "front"
      death_explosion_left : PAIN_DIRECTION "left"
      death_explosion_right : PAIN_DIRECTION "right"
      death_explosion_small : default 
     }
     
     states
     {
      DEATH_EXPLOSION_LARGE : PAIN_THRESHOLD "150"
      DEATH_EXPLOSION_BACK : PAIN_DIRECTION "front"
      DEATH_EXPLOSION_LEFT : PAIN_DIRECTION "left"
      DEATH_EXPLOSION_RIGHT : PAIN_DIRECTION "right"
      DEATH_EXPLOSION_SMALL : default 
     }
    }
    state DEATH_EXPLOSION_LARGE
    {
     action
     {    
     death_explosion_large : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_explosion_large"
     }
    }
    state DEATH_EXPLOSION_BACK
    {
     action
     {    
     death_explosion_back : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_explosion_back"
     }
    }
    state DEATH_EXPLOSION_LEFT
    {
     action
     {    
     death_explosion_left : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_explosion_left"
     }
    }
    state DEATH_EXPLOSION_RIGHT
    {
     action
     {    
     death_explosion_right : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_explosion_right"
     }
    }
    state DEATH_EXPLOSION_SMALL
    {
     action
     {    
     death_explosion_small : default
     }
     states
     {
     DEATH_DONE : ANIMDONE_TORSO
     }
     entrycommands
     {
     exec global/dead_body.scr "death_explosion_small"
     }
    }
    state DEATH_DONE
    {
     movetype anim
     entrycommands
     {
    model fx/dummy.tik
     dead
     }
    }
    state REVIVAL
    {
     movetype absolute
     states
     {
      REVIVAL : +USE
     }
    }
    
    now create the script:

    Code:
    global/dead_body.scr
    containing this:

    Code:
    main local.anim:
     
    local.body = spawn animate origin self.origin model self.model
    local.body anim local.anim
     
     
    end
     
    
    just wrote that in here so it is untested..
  20. Gladiator Private

    Contributions:
    2
    How should i save the state now? Under what name...

    edit: Nevermind i just figured it out...

Share This Page