mugen chars, rare characters
Mugen | CHAT | Transformation help? - Forum | Registration | Login
[New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 2
  • 1
  • 2
  • »
Transformation help?
Robcat030Date: Monday, 2011-08-29, 7:39 PM | Message # 1
Baby
Group: Users
Messages: 10
Awards: 0
Reputation: 0
Reproofs: 0%
Status: Offline
Hi. I am trying to reverse the transformation on my character, and i am unsure of wht coding i need.

This is the state tht transforms my character:
Code

[Statedef 1000]
type    = S
movetype= A
physics = C
juggle  = 7
poweradd= -100
ctrl = 0
anim = 1000

[State 1000, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 1000, VarAdd]
type = VarAdd
trigger1 = animelem = 1
v = 1
value = 90

This is the changeanim tht i use to change my stand anim:
Code

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = var(1) = 90  ; This means that you need to be in var 0 and has to be value 90
trigger1 = Anim != 10000 && Anim != 10005    ;Means that it doesent activate when you already is in anim 10000  or in anim 10005  
trigger2 = Anim = 10005 && AnimTime = 0  
value = 10000  

Then i changed my -2 state to keep any innapropriate sprites from showing:
Code

[State -2]
type = ChangeAnim
trigger1 = Var(1) = 90
trigger1 = Anim < 10000
trigger1 = SelfAnimExist(Anim + 10000)
value = Anim + 10000

This all worked, but i cannot change the variable back to default so tht my original stand anim is showed:( Any help would be appreciated.
 
sgn_15Date: Tuesday, 2011-08-30, 7:02 AM | Message # 2
God
Group: contributor
Messages: 2518
Awards: 4
Reputation: 31
Reproofs: 0%
Status: Offline
wait. i dont get it. why you need state -2??? when i code transformation, you have a statedef where you "switched on" a variable then changestate back to 0

then you need to edit your common1.cns and add all changeanims another set with additional trigger of your var for the transformations
then you also add a "turned off" var trigger for your base form

you dont need to make new states, just new anims (at least for basic movements and damage/guard, etc)
for attacks in new form, obviously new states are needed (unless its the same attacking pose) from the base form

for your problem, do you have common1.cns? just open it and look at changeanim per state. copy it then add a var trigger to both (1 for base form, 1 for new form)

that is how i code transformation, and i think its pretty practical

sorry i cant check mugen stuff irght now. dont have any

Added (2011-08-30, 7:02 Am)
---------------------------------------------
if you want to go back to first form, make a statedef (a move that can only be used while in 2nd form, i mean a trigger in cmd) that "turns off" that same var used for transformation


 
Robcat030Date: Tuesday, 2011-08-30, 4:10 PM | Message # 3
Baby
Group: Users
Messages: 10
Awards: 0
Reputation: 0
Reproofs: 0%
Status: Offline
State -2 says tht if you are in state 0, but state 10000 is displayed, then any other animation tht is 10000+ the original number is shown instead. This way i dont have to use a changeanim on every single state in my common. But for some reason it doesnt work when i change the variable back.
 
sgn_15Date: Tuesday, 2011-08-30, 4:29 PM | Message # 4
God
Group: contributor
Messages: 2518
Awards: 4
Reputation: 31
Reproofs: 0%
Status: Offline
ok ok now i understood. sorry sad

did you try another changeanim in state -2 (this time with -1000, instead of +1000 in anim number) with trigger being var(1) != 90 ?

Added (2011-08-30, 4:29 PM)
---------------------------------------------
i mean use your own idea just reverse the process

this i mean

Quote (Robcat030)
[State -2]
type = ChangeAnim
trigger1 = Var(1) = 90
trigger1 = Anim < 10000
trigger1 = SelfAnimExist(Anim + 10000)
value = Anim + 10000


 
Robcat030Date: Tuesday, 2011-08-30, 4:46 PM | Message # 5
Baby
Group: Users
Messages: 10
Awards: 0
Reputation: 0
Reproofs: 0%
Status: Offline
Thanks that actually worked. I had to add a code to override the original -2 state. Then it reversed. thanks for the advice. I also have another problem. I cannot get my char to walk in his transformed state. i tried using a changeanim but maybe i used the wrong triggers or something? It was something like this:
Code

[State 20, ChangeAnim]
type = ChangeAnim
triggerall = var(1) = 90   
triggerall = var(2) != 90
trigger1 = Animelem = 1     
trigger2 = Anim = 10005 && AnimTime = 0  
value = 10020

Hope im not too off topic.
 
sgn_15Date: Tuesday, 2011-08-30, 4:55 PM | Message # 6
God
Group: contributor
Messages: 2518
Awards: 4
Reputation: 31
Reproofs: 0%
Status: Offline
Quote (Robcat030)
Hope im not too off topic.

no dude youre free to ask, this is your thread anyways

well these are the codes from default common1.cns

Quote
[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21


so try changing those by adding a trigger of your var (for not transformed yet)
Quote
[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
triggerall = var(1) != 90
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
triggerall = var(1) != 90
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21


then for transformation walk
Quote
[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
triggerall = var(1) = 90
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 10020

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
triggerall = var(1) = 90
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 10021


so you have 4 changeanims (the last 2 quotes of my post). try them

Added (2011-08-30, 4:55 PM)
---------------------------------------------
and btw those 2 triggerall are contradicting each other surprised

Quote (Robcat030)
[State 20, ChangeAnim]
type = ChangeAnim
triggerall = var(1) = 90
triggerall = var(2) != 90

trigger1 = Animelem = 1
trigger2 = Anim = 10005 && AnimTime = 0
value = 10020

maybe thats why it didnt worked


 
Robcat030Date: Tuesday, 2011-08-30, 5:30 PM | Message # 7
Baby
Group: Users
Messages: 10
Awards: 0
Reputation: 0
Reproofs: 0%
Status: Offline
So i took out the change anim tht i originally had, then added the triggers u decribed, and added the other changanims. But for some reason it only shows the first frame of the animation.
 
sgn_15Date: Tuesday, 2011-08-30, 5:42 PM | Message # 8
God
Group: contributor
Messages: 2518
Awards: 4
Reputation: 31
Reproofs: 0%
Status: Offline
wait. so its working for both 1st and 2nd form but only the first frame is shown for both?

Added (2011-08-30, 5:42 PM)
---------------------------------------------

Quote (Robcat030)

[State 20, ChangeAnim]
type = ChangeAnim
triggerall = var(1) = 90
triggerall = var(2) != 90

trigger1 = Animelem = 1
trigger2 = Anim = 10005 && AnimTime = 0
value = 10020

did you used that changeanim still and just changed the triggers (ones in orange)???

that animelem = 1 trigger might be the reason. since youre not using elem parameter of changeanim (or i mean you omitted it), it should use all frames in your walk anims (both forms)


 
Robcat030Date: Tuesday, 2011-08-30, 5:46 PM | Message # 9
Baby
Group: Users
Messages: 10
Awards: 0
Reputation: 0
Reproofs: 0%
Status: Offline
Sorry i should have been more clear. 1st form works fully. but when i switch to second form only the first walking frame shows.

Added (2011-08-30, 5:46 PM)
---------------------------------------------
And no i removed tht changeanim completely.

Code

[State 20, ChangeAnim]  
type = ChangeAnim  
triggerall = var(1) = 90  
triggerall = var(2) != 90  
trigger1 = Animelem = 1  
trigger2 = Anim = 10005 && AnimTime = 0  
value = 10020  
 
sgn_15Date: Tuesday, 2011-08-30, 5:50 PM | Message # 10
God
Group: contributor
Messages: 2518
Awards: 4
Reputation: 31
Reproofs: 0%
Status: Offline
so can you post your codes you are using now? lets take a look at your codes again. the codes you have now

 
Robcat030Date: Tuesday, 2011-08-30, 5:55 PM | Message # 11
Baby
Group: Users
Messages: 10
Awards: 0
Reputation: 0
Reproofs: 0%
Status: Offline
This is the entire walking code in my common file
Code

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

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
Triggerall = vel x > 0
triggerall = var(1) != 90
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
Triggerall = vel x < 0
triggerall = var(1) != 90
trigger1 = Anim != 21 && Anim != 5
trigger2 = Animtime = 0
value = 21

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
triggerall = var(1) = 90
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 10020

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
triggerall = var(1) = 90
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 10021
 
sgn_15Date: Tuesday, 2011-08-30, 6:10 PM | Message # 12
God
Group: contributor
Messages: 2518
Awards: 4
Reputation: 31
Reproofs: 0%
Status: Offline
Quote

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

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
Triggerall = vel x > 0
triggerall = var(1) != 90
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
Triggerall = vel x < 0
triggerall = var(1) != 90
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
triggerall = var(1) = 90
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 10020

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
triggerall = var(1) = 90
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 10021


try it. the code in yellow is the one i changed.


 
Robcat030Date: Tuesday, 2011-08-30, 6:44 PM | Message # 13
Baby
Group: Users
Messages: 10
Awards: 0
Reputation: 0
Reproofs: 0%
Status: Offline
Still same results. This is definately a strange situation.
 
sgn_15Date: Tuesday, 2011-08-30, 6:56 PM | Message # 14
God
Group: contributor
Messages: 2518
Awards: 4
Reputation: 31
Reproofs: 0%
Status: Offline
dont give up, i have had more ridiculous problems in the past lol

ok i looked up my old coding files and this is how a transformation walk should look like

Quote
; Walk
[Statedef 20]
type = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
triggerall = var(10) = 0
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
triggerall = var(10) = 0
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 1]
type = VelSet
triggerall = var(10) = 1
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x) + 1

[State 20, 2]
type = VelSet
triggerall = var(10) = 1
trigger1 = command = "holdback"
x = const(velocity.walk.back.x) - 1

[State 20, 3]
type = ChangeAnim
triggerall = var(10) = 0
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = var(10) = 0
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

[State 20, 3]
type = ChangeAnim
triggerall = var(10) = 1
triggerall = vel x > 0
trigger1 = Anim != 1020
value = 1020

[State 20, 4]
type = ChangeAnim
triggerall = var(10) = 1
triggerall = vel x < 0
trigger1 = Anim != 1021
value = 1021


in this example,
var(10) = 0 first form
var(10) = 1 second form

20 and 21 = first form walk
1020 and 1021 = second form walk

its the same concept, just adjust your variables and var values and anim values, that should work now

reply to this thread again if its still not working or its working. im going to go now. cheers, dont give up. good luck




Message edited by sgn_15 - Tuesday, 2011-08-30, 6:58 PM
 
Robcat030Date: Tuesday, 2011-08-30, 7:05 PM | Message # 15
Baby
Group: Users
Messages: 10
Awards: 0
Reputation: 0
Reproofs: 0%
Status: Offline
Allright well its still not working, but i appreciate all the help youve been giving me. Guess ill keep trying to figure this out.

Thanks again,
Robcat
 
  • Page 1 of 2
  • 1
  • 2
  • »
Search:

Copyright MyCorp © 2024 Create a free website with uCoz