UPLOAD, SHARE, PRESERVE MUGEN FOR ETERNITY!

Results 1 to 7 of 7

Thread: How to poison/drain life?

  1. #1

    Default How to poison/drain life?

    Ok, so I managed to pull this off somehow by putting the enemy in a custom state however there is still a small issue. I hit the player 2 (P2) with a projectile and if he is on the ground it works perfectly. P2 gets in a custom state and losses health however if he jumps and is hit in the air, he flies off screen. Can someone help me with this? This is the code I am using:
    [Statedef 850]
    type = S
    movetype= A
    physics = N
    juggle = 2
    ctrl = 0
    anim = 850
    poweradd = 0
    velset = 0,0
    sprpriority = 5
    facep2 = 1

    [State 0, Projectile]
    type = Projectile
    trigger1 = animelem = 5
    ProjID = 851
    projanim = 851
    projhitanim = -1
    projremanim = -1
    projcancelanim = -1
    projscale = 1,1
    projremove = 1
    projremovetime = -1
    velocity = 8,0
    remvelocity = 0,0
    accel = 0,0
    velmul = 1
    projhits = 1
    projpriority = 1
    projsprpriority = 3
    projedgebound = 0
    projstagebound = 0
    projheightbound = 0
    offset = 0,0
    postype = p1 ;p2,front,back,left,right
    projshadow = 0,0,0
    supermovetime = 0
    pausemovetime = 0
    attr = S, NA
    animtype = Medium
    damage = 0
    guardflag =
    pausetime = 0,0
    sparkno = -1
    guard.sparkno = s7000
    sparkxy = -8,-25
    hitsound = S1,5
    guardsound = S4,1
    ground.type = High
    ground.slidetime = 0
    ground.hittime = 0
    ground.velocity = 0,0
    air.velocity = 0,0
    Fall = 0
    Envshake.time = 15
    p2stateno = 1012


    [State 0, ChangeState]
    type = ChangeState
    trigger1 = animtime = 0
    value = 0
    ctrl = 1


    ;--------------------------------
    ;curse
    [Statedef 1012]
    type = S
    movetype= A
    physics = N
    juggle = 2
    anim = 5300

    [State 0, ChangeAnim]
    type = ChangeAnim
    trigger1 = !time
    value = 5300


    [State -3, Regeneration]
    type = LifeAdd
    triggerall = Alive = 1
    trigger1 = (GameTime%4) = 0
    ignorehitpause = 0
    value = -10

    [State 0, TargetPowerAdd]
    type = TargetPowerAdd
    trigger1 = 1
    value = -1

    [State 0, ChangeState]
    type = ChangeState
    trigger1 = time = 150
    value = 0
    ctrl = 1
    Last edited by D@rk_Gaara; May 13, 2018 at 18:25.



  2. #2
    mulambo is offline wicked and toxic user banned for repeated defamation, spreading plain lies with clear intent to damage people's reputation and/or ruin people's motivation
    Join Date
    Aug 2016
    Location
    Posts
    1,733
    Uploads
    70
    Comments
    55

    Default Re: How to poison/drain life?

    Never tried it myself, but I guess you need to set up an helper and get rid of the custom state (so the enemy can still act while his life is being drained). I suppose that helper should "spawn" as invisible (or visible, it can also be something like a classic RPG "poison" animation over the enemy) only if the projectile hits the opponent. Should have a P2LifeAdd with a simple trigger like time >=0 and a little value (or the enemy will die too soon). Obviously such helper must destroy self after a while (unless you want it till the enemy's death).

    So, uhm actually the projectile should be also a helper so you can trigger the other helper (the "curse") with a variable.

  3. #3

    Default Re: How to poison/drain life?

    Hmm, I'm not really sure I understand what you mean. But still i like how it looks now, I put the enemy in a "dizzy" like state for a short period of time and he slowly loses health for that time but the problem is that if the projectile hits player 2 while he is in the air, he freezes in the air and does not fall on the ground and I have tried all the physics types but it never works fine for some reason.

  4. #4
    mulambo is offline wicked and toxic user banned for repeated defamation, spreading plain lies with clear intent to damage people's reputation and/or ruin people's motivation
    Join Date
    Aug 2016
    Location
    Posts
    1,733
    Uploads
    70
    Comments
    55

    Default Re: How to poison/drain life?

    Quote Originally Posted by Oberst_Kroenen View Post
    he freezes in the air and does not fall on the ground and I have tried all the physics types but it never works fine for some reason.
    It's more complex than just a projectile, it doesn't act like "one strike and that's all".

    But even if you like it that way, here's what's wrong in your code:

    [State 0, ChangeState]
    type = ChangeState
    trigger1 = time = 150
    value = 0 <---------it goes to state 0, STANDING
    ctrl = 1

    This way, at the end of the custom state it goes to state 0 (no matter if he's in air, crouch or standing). 0 state is STANDING, if you want him to just fall, use 5050... but that would look awkward anyway, that's why I suggested you to use a helper instead of a projectile, erase the custom state, and make a second helper that drains the opponents life while the opponent still fights.
    Last edited by mulambo; May 14, 2018 at 17:11.

  5. #5
    Join Date
    Aug 2017
    Location
    Age
    24
    Posts
    8
    Uploads
    2
    Comments
    0

    Default Re: How to poison/drain life?

    Be creative! xD try mad things like... a gravity code or a gravity code with time or a gravity code with a p2stateno = A...., create a backup and try harder! TRY EVERYTHING! i believe in you!

  6. #6

    Default Re: How to poison/drain life?

    Hehe thanks. I'm currently experimenting with the gravity code. Let's hope i'll figure something out.

  7. #7

    Default Re: How to poison/drain life?

    Alright I managed to make it work by adding the following:

    [State 0, VelSet]
    type = VelSet
    trigger1 = Pos y <= -1
    y = 4


    [State 0, VelMul]
    type = VelMul
    trigger1 = Pos Y >= 0
    y = 0


    Now if p2 is hit while in the AIR, he quickly gets to the ground.

Similar Threads

  1. How is your life?
    By Left4Joker in forum Misc Non-MUGEN discussions
    Replies: 135
    Last Post: Feb 21, 2023, 03:04
  2. Replies: 12
    Last Post: Jul 11, 2020, 23:59
  3. Poison Ivy by Harbinger and ZVitor
    By DysonJR in forum WIP News
    Replies: 5
    Last Post: Mar 17, 2018, 20:10
  4. life com tempo
    By tojjo2006 in forum MUGEN Configuration Help
    Replies: 14
    Last Post: May 25, 2017, 15:29
  5. Life value?
    By jlr24lp in forum MUGEN Configuration Help
    Replies: 6
    Last Post: May 23, 2017, 10:10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •