The Mugen Fighters Guild
Help => M.U.G.E.N Development Help => Code Library => Topic started by: 2OS on October 07, 2012, 03:28:18 am
-
[Statedef -2]
[State 2OS]
type=helper
trigger1=!numhelper(20000)
id=20000
stateno=20000
name="Power Bar System"
ownpal=!ishelper
ignorehitpause=1
pausemovetime=2147483647
supermovetime=2147483647
[Statedef 20000]
[State Warusaki3]
type=playsnd
trigger1=ishelper(20000)
trigger1=root,power/1000-var(1)/1000>0
value=4000,0+(root,power>=root,powermax)*1 ;; 4000,0 for normal level up. 4000,1 if there is a maximum level sound.
abspan=1 ;; panning is centered because this is systematic.
ignorehitpause=1
[State Warusaki3]
type=varset
trigger1=ishelper(20000)
var(1)=root,power
ignorehitpause=1
-
Offtopic: 2147483647 ticks worth of pausemovetime is approximately 1.1341608397554524636432005813708 years (who keeps MUGEN running that long?)
Ontopic: I was about to say that the sounds might repeat themselves when not wanted, until I looked over the code again. Small and efficient, but I probably would have used a changestate for the helper with the playsound in the second state with persistent = 0, with an immediate changestate back, just to avoid any possibility of the sound repeating itself when not needed.
-
2147483647 is supposed to be riddling, but not for ""how long"". everyone knows what -1 and 9999999 means.
-
2147483647 is supposed to be riddling, but not for ""how long"". everyone knows what -1 and 9999999 means.
I'm aware of why 2147483647 is used, I was just posting some useless trivia for the hell of it at the same time as I was posting something that was on topic.