YesNoOk
avatar

How to trigger fall from air after power drops to zero (Read 16329 times)

Started by CHAOS13, December 20, 2021, 09:47:54 PM
Share this topic:
How to trigger fall from air after power drops to zero
#1  December 20, 2021, 09:47:54 PM
    • UK
Hi friends.I need help about a character I upgrade.The vharacter is Goku and I need a help when he is in the air and his super power drops to 0 I want him to come or fall down from the air if he is in the air or fly.
The recent CMD looks like this:

[State -1, 超サイヤ人ブルー]   
type = ChangeState
value = 10004
TriggerAll = var(47) >= 5
TriggerAll = Var(59) <= 0
triggerall = var(11) != 1
trigger1 = command = "henshin"
trigger1 = var(1) = 4               
trigger2 = command = "henshin3"
trigger2 = var(1) < 4

I dont thinkso that I have to change this into the CMD.
I think I have to change this in the CNS file which is this.

[state -2 , 特殊ゲージ・超サイヤ人ブルー]           
type = Varadd
triggerall = !Ishelper
trigger1=var(20)=gametime*5
trigger1 = RoundState = 2
trigger1 = var(1) = 5 && var(11) = 0 && var(10) = 0
trigger1 = gametime % 5 = 0
trigger1 = var(33) <= 1000                                                      ;this is the amount of super power
trigger1 = var(33) >= 0                                                             ;this is the lowest superpower can have
var(33) = -fvar(18)                                                                      ;this is the speed of the super power consumption

My question and need help how can I force the player to go to down from fly after the super drops to 0?
Because than I can use the transformation to Ultra Instinct,but if dont go down automaticaly than I have to fly down and the super stops at 0 in the air,its totally error.Thats why I need him to fall or come,jump down after the super drops to 0.
I found some helpfull informations about this like force the character to coordinate ''value y = 0' something like this.

[State 0,1]
type = ChangeState
trigger1 = Vel Y >= 0
trigger1 = Pos Y >= 0
value = 10004

Any suggestion?
Thank you for your helping.
Re: How to trigger fall from air after power drops to zero
#2  December 29, 2021, 08:54:18 PM
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You can do a relatively simple changstate value 50 when power <= 0. Just choose precisely when you need it. 50 is jump and he'll just fall. State -1 or in the flying state itself.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: How to trigger fall from air after power drops to zero
#3  January 02, 2022, 02:22:51 AM
    • UK
Thank you.I found the solution.I had to write something like this into the fly.cns


;============================================================
;NO FLY AFTER SUPER POWER IS 0-ZERO
;============================================================
[state 0, ChangeState]

type = ChangeState

trigger1 = var(33) <= 0     ;this was the superpower if drops to 0-zero will do value 1025 which is selfemade

value = 1025

ctrl = 1


;============================================================
;FALL FROM SKY,FLY ANIM
;============================================================
[Statedef 1025]   
type    = S
physics = S
sprpriority = 0
ctrl = 0
anim = 41+(var(1)*(10000))

[State 0, FALL]
type = ChangeState
trigger1 = Time = 3
trigger1 = pos y < 0
value = 1026

;============================================================
;FALL FROM SKY SAME AS 1317 JUST FOR DIFFERENT PURPOSE
;============================================================
[Statedef 1026]
type    = A
physics = A
hitcountpersist = 1

[State 50, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 50, 3]
type = ChangeAnim
trigger1 = Time = 0
value = 41+(var(1)*(10000))

Really thanks for your help Cyanide I seen you helped many others.Happy new year :)