collapse

Author Topic: injuried face effects  (Read 693 times)

0 Members and 1 Guest are viewing this topic.

Offline Demongorne

  • Initiate
  • **
  • Posts: 81
  • Last Login:March 19, 2022, 06:22:07 AM
    • Email
injuried face effects
« on: April 12, 2016, 01:21:42 PM »
Hello buddie what's going on? I'm still working on aof ryo I need to have more animations in the statdef 0 basically I want to have  some animations when p1 get damges I wrote this code in statdef 0   
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = life <= 800 && Animtime = 0
trigger1 = 1
value = ifelse(var(21)!=0,1,3)




Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: injuried face effects
« Reply #1 on: April 13, 2016, 02:28:19 AM »
What does var(21) have to do with it?

You have a specific piece of code in the states for one animation. Copy paste it over and over and add life triggers for all of them. So on the normal one

life > 800
value = 0
on the next
life = [800,400]
value = 1
on the next
life < 400
value = 2

Simplest way to manage it. Alter the other triggers to fit the animation values you're using.

Offline Demongorne

  • Initiate
  • **
  • Posts: 81
  • Last Login:March 19, 2022, 06:22:07 AM
    • Email
Re: injuried face effects
« Reply #2 on: April 13, 2016, 11:10:55 AM »
I wrote this
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = life > 800 && ! animtime
trigger1 = 1
value = 0

[State 1, ChangeAnim]
type = ChangeAnim
trigger1= life = [800, 700]
value = 3000

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = life< 700
value = 4000

but th second changeanim is not displayed and when the player goes under 800 lp the stance isn't displayed

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: injuried face effects
« Reply #3 on: April 14, 2016, 03:38:03 AM »
copy paste it over and over

Don't take stuff out. Use EXACTLY what is there, and alter it to fit. If you need to change triggers, do so, but don't remove any completely. Add in the new stuff, make sure you understand what you're reading.

triggerall = life > 800 && ! animtime
trigger1 = 1

Even that is somewhat wrong, that's not what the normal changeanim looks like for statedef 0. Go back to it as it is normally and alter it to fit rather than stripping it out.

Offline Demongorne

  • Initiate
  • **
  • Posts: 81
  • Last Login:March 19, 2022, 06:22:07 AM
    • Email
Re: injuried face effects
« Reply #4 on: April 14, 2016, 05:09:36 AM »
I'll post the statedef

[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = life>800 && ! animtime
value = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = life = [800,700]
value = 3000  && ! animtime

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = life<700 && ! animtime
value = 4000

the problem is the same the second changeanim doesn't work  :(

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: injuried face effects
« Reply #5 on: April 15, 2016, 05:20:45 AM »
That is mostly because you're not doing what i've said.

This is what the changeanim in state 0 looks like

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

You don't seem to be using it at all.

Change it so it fits

[State 0, 1]
type = ChangeAnim
triggerall = life > 800
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 1]
type = ChangeAnim
triggerall = life < 800
trigger1 = Anim != 3000 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 3000

Offline Demongorne

  • Initiate
  • **
  • Posts: 81
  • Last Login:March 19, 2022, 06:22:07 AM
    • Email
Re: injuried face effects
« Reply #6 on: April 15, 2016, 07:59:28 AM »
Ok this works correctly for two animations but I need two have for different animations  in statedef 0, I putted this  trying for 3 animations but the in the last one the stance is freezed on one frame 

[State 0, 1]
type = ChangeAnim
triggerall = life > 800
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 1]
type = ChangeAnim
triggerall = life<800
trigger1 = Anim != 3000 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 3000

[State 0, 1]
type = ChangeAnim
triggerall = life<700
trigger1 = Anim != 4000 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 4000

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: injuried face effects
« Reply #7 on: April 15, 2016, 09:50:43 PM »
That's because life < 800 and life < 700 are true at the same time. If you want to do that, start segragating

triggerall = life = [701,799] OR triggerall = life < 800 && life > 700

and on the other one you can use life < 700. You have to make sure that you don't have key triggers true at the same time, otherwise mugen will activate both equally.

Offline Demongorne

  • Initiate
  • **
  • Posts: 81
  • Last Login:March 19, 2022, 06:22:07 AM
    • Email
Re: injuried face effects
« Reply #8 on: April 16, 2016, 05:11:58 AM »
all right thanks a lot pal but i have just onether question: due I have six differents stances for ryo i'd like to use use them randomly basically i want that sometimes mugen display them random during the rounds

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: injuried face effects
« Reply #9 on: April 16, 2016, 05:38:20 AM »
Wait, you have 6 stances + injured sprites for all of them? For this to become sensible we now need to get into variables, and your animations really really need to follow a logical number progression. 0, then 3000, then other random numbers isn't going to cut it. I mean, we can duplicate what you've got done already for other stances and maybe do some detection on which anim is playing, and increasing to 3000 or whatever depending on what it is. But it would have been nice to know this before hand.

Ok, simple stuff.

Step 1. All your stances, and their injured components must follow a logical numerical progression. So you have stance 1. The animations for this are 0, 1, 2

You have stance 2, the animations for this are (i'm jumping up a lot of numbers here, bare with me) 10000, 10001 and 10002
You have stance 3 animations are
10010, 10011, 10012

And so on. Keep going upwards until you have each anim, and it's equivalent injured sprites

We have to create 2 varsets for the randomisation (there are other ways, this is easiest)
First one randomises which stance

varset
trigger1 = time = 0 ; Each time you enter the state
v = 0
value = 0+random%6

Second variable keeps track of your life
trigger1 = time = 0
v = 1
value = ifelse(life > 800, 2, ifelse(life < 700, 0, 1))

Explaining. If life is greater than 800, become 0, otherwise check if life is less than 700, then become 0, otherwise life is logically between 700 and 800, so become 1.

Then in your changeanim it becomes

trigger1 = Anim != 0+((!var(0))*10000)+var(1) && Anim != 5
value = 0+((var(0) != 0)*10000)+var(1)

See how complicated that got. The equation above takes 0, evaluates the value of var(0), if it finds it's greater than 0, it becomes 1, if it is 0, it's 0. Multiplies it by 10000, this takes you up to your next stand animation, and then adds to it based on the value of your injuredness.

Have fun with that. I will see you when you attempt it and need more help.

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

Ballroom Hallway (1.1 Only/AIGS) by Vegaz by LightFlare
[May 09, 2024, 11:53:48 AM]


Neon Light Force Demo by kyoman
[May 08, 2024, 12:50:05 PM]


D2TD VS Showcase Thread by D2TD
[May 05, 2024, 10:08:50 AM]


Classic VS : Athena by ELECTRO
[May 02, 2024, 09:44:33 PM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[April 21, 2024, 12:09:20 PM]


Ultimate E. Honda + stage by ELECTRO
[April 18, 2024, 09:47:24 PM]


Sunset Beach (1.1 Only/AIGS) by Vegaz by LightFlare
[April 16, 2024, 06:55:00 PM]


Wonder Twins 2.0 by brucewayne74, Shining and Skhsato123 by brucewayne74
[April 05, 2024, 06:07:48 PM]


X-Men Training Room (Bright & Dark) Stage 1.1 & 1.0 by MatreroG
[April 05, 2024, 10:55:29 AM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[April 01, 2024, 11:03:03 PM]

* IMT Calendar

May 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 31

SimplePortal 2.3.5 © 2008-2012, SimplePortal