collapse

Author Topic: make a animelem perform only once than if its anim is executed again skip it?  (Read 1045 times)

0 Members and 1 Guest are viewing this topic.

Offline bingo75

  • New Member
  • *
  • Posts: 3
  • Last Login:October 02, 2012, 05:11:26 PM
  • Hi! I'm new!!
Hello my name is bingo75 I am decently new to  mugen and, recently I have to decided to
make my own char, but I ran into a problem where when my char transforms (var(1) = 1)
I want my char to peform its first animelem only once in standing  anim  than if that anim is
ever executed again it will skip animelem 1 and go to 2.
« Last Edit: October 01, 2012, 03:24:32 AM by bingo75 »



Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
once while in the standing state, or at the start of the standing state each time you enter it?

Option 2 is simple, option 1 requires use of a variable (or setting your current to a new value if that's feasible)

Offline bingo75

  • New Member
  • *
  • Posts: 3
  • Last Login:October 02, 2012, 05:11:26 PM
  • Hi! I'm new!!
once while in the standing state, or at the start of the standing state each time you enter it?

Option 2 is simple, option 1 requires use of a variable (or setting your current to a new value if that's feasible)

Basicly Im trying make it skip animelem 1 in anim 10000 after  being excuted one time
 and once var (0) = 1 once than always play animelem2 and so forth, and I forgot to mention
but I also want a hitdef that will always execute when transformed.
And by the way what option 1 and option 2 are you talking about?

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
I listed 2 ways you might want to do it as you did not define them.

One is really simple, all you do is put a loopstart on the animation. So it will do frame 1, then loop frame 2,3,4,5. But it will do that EVERY time you enter the standing state. I don't know if you want that (still don't as your last post doesn't say)

The other one requires changeanim. And making use of a variable. As you have a defined value for your variable, this means an ADDITIONAL variable on top of the existing one.

[State changeanim]
type = changeanim
triggerall = var(1) = 10000
trigger1 = anim != 10000
trigger2 = animtime = 0 && anim = 5
triggerall = var(2) = 1 ;Use whatever you have free
value = 10000
elem = 2

[State changeanim]
type = changeanim
triggerall = var(1) = 10000
trigger1 = anim != 10000
trigger2 = animtime = 0 && anim = 5
triggerall = var(2) = 0 && var(2) := 1 ;Use whatever you have free
value = 10000
elem = 1
persistent = 0

What that does (keep them in order) is it looks at this second variable, if it's set to 1, it'll play from animelem = 2. If it's NOT set to 1, that controller is passed over and it moves to the next. It checks the value of var(2), finds it to be 0, then sets it to 1 (my syntax may be dodgy here). It'll then play the animation from elem1. Next time the state is entered, var(2) is 1 already and the first frame will not be played.

Either way requires the anim to have a loopstart in it.
Honestly using a variable for this is pretty ugly and the loopstart is much easier to deal with.

As for the hitdef, you mean, during the transformation? Add one, not complex.

Offline bingo75

  • New Member
  • *
  • Posts: 3
  • Last Login:October 02, 2012, 05:11:26 PM
  • Hi! I'm new!!
thanks  for your help treid what you posted and it worked!  ^^(PM)^

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