collapse

Author Topic: Creating a poison effect  (Read 3118 times)

0 Members and 1 Guest are viewing this topic.

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Creating a poison effect
« on: April 11, 2015, 06:45:08 AM »
Coding level: Advanced

Word of warning. Doing this makes use of a bug in mugens code. It may be fixed by elecbyte at some point at which point it will not work. Hopefully they'll give us an actual poison by then

This code relies on having a helper use a reversaldef on p2, once that is complete the helper will never lose their target.

Step 1
Hit player 2 with something, doesn't matter what it is. Make sure that you put them into a custom state

Step 2
Create a custom animation for player 2. Should look like a normal hit animation. However make sure you add a RED clsn1 on it.

Activate a hitdef inside this custom state. 0 damage, animtype = none, invisible spark etc etc. Anything and everything you can do to make it look like nothing happened.

Use LifeAdd to make p2 take damage from the original hit. This state is movetype = A rather than movetype = H

Step 3
When p2 is hit, spawn a helper. No clsn2 (blue) boxes. Use a clsn1 (red) box however. The helper should sit exactly, or as near as possible to p2's clsn1

Step 4
Helper when created has a reversaldef set, this reversaldef should apply to player 2's hitdef, so it should be reversing whatever attributes p2 used. Don't use p1 or p2stateno here, the helper doesn't actually need to change state for this to work, it just has to have its reversaldef activated

Step 5
Helpers state must be A to start with. Set to I as soon as the reversaldef takes effect. However it doesn't matter if p1 hits p2 from this point on, the helper will retain p2 as a target, so we can use targetlifeadd to drain their health without putting them in a hitstate over and over

[State TargetLifeAdd]
Type = TargetLifeAdd
trigger1 = 1
value = -20
persistent = 20

Your opponent is now poisoned and their life can be drained on command, without hitting them. Generally a good idea to give the helper a timer and not have the poison do THAT much damage because it's a bit unfair if it never stops. Also, this allows you to turn them green with palfx and have it last for the duration of the poison as well.

Sadly, this will not work on opponents with super armour. The way super armour is normally coded you will not be able to place them in a custom state.

Happy to answer some questions, or make this a bit clearer if it doesn't make sense. This is absolutely not for new players.




Offline DEMONKAI

  • The Visionary and IMT's
  • Contributor
  • ****
  • Posts: 8335
  • Country: United States us
  • Last Login:October 11, 2022, 09:44:18 PM
  • Never limit your vision as a creator!!
    • DTHECHEMIST
    • D THE CHEMIST
    • Demonkai's Mugen
Re: Creating a poison effect
« Reply #1 on: April 11, 2015, 06:22:34 PM »
Thanks for the tip. I saved this to my notes for future use
Lots and lots of supers so f*ckin what

HAIL CROM!!

Offline A!

  • Novice Coder
  • Infinity Regular
  • ****
  • Posts: 1318
  • Country: United Kingdom gb
  • Last Login:August 03, 2019, 06:10:28 PM
  • Don't Hate If You Cant Create
Re: Creating a poison effect
« Reply #2 on: April 17, 2015, 04:16:34 PM »
This is great. I'm going to try this eventually.

Quote
Helpers state must be A to start with. Set to I as soon as the reversaldef takes effect.

Would you do this with StateTypSet then triggers with movecontact/movehit? or is it with ReversalDef. I have never tried ReversalDef as of yet. Apologise if this is a dumb question.
A guy told me one time, "Don't let yourself get attached to anything you are not willing to walk out on in 30 seconds flat if you feel the heat around the corner."

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Creating a poison effect
« Reply #3 on: April 17, 2015, 08:18:14 PM »
Use a time trigger. Reversaldef doesn't cause movecontact. You're not going to have a very long activation, mostly to make sure it's less likely someone else will hit the clsn1.

To further this i would suggest that the attr are set to C, HT which is a crouching hyper throw. Cant' think of anything that would use that, ever.

Offline Hellzone

  • Character Creator Newbie
  • Forum Member
  • ***
  • Posts: 278
  • Country: United States us
  • Last Login:April 11, 2019, 09:08:42 PM
    • Skype - defcon_awesome
    • ItzHellzone Gaming
    • Email
Re: Creating a poison effect
« Reply #4 on: May 02, 2015, 05:10:10 PM »
this is awesome! i was wondering how to achive this! is it safe to assume this mehthod could be used for a burning effect?

Offline fron

  • Initiate
  • **
  • Posts: 25
  • Country: Argentina ar
  • Last Login:February 12, 2020, 02:47:52 AM
Re: Creating a poison effect
« Reply #5 on: May 03, 2015, 05:20:33 PM »
Thanks a lot, it works!  :thumbsup:

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Creating a poison effect
« Reply #6 on: May 04, 2015, 11:11:36 PM »
Yes, you could absolutely attach fire sprites to the opponent and treat it as an ongoing burn as well.

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

* IMT Calendar

April 2024
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 [19] 20
21 22 23 24 25 26 27
28 29 30

SimplePortal 2.3.5 © 2008-2012, SimplePortal