YesNoOk
avatar

Training Mode Detector (Read 7002 times)

Started by 2OS, August 24, 2012, 10:13:41 pm
Share this topic:

2OS

Training Mode Detector
#1  August 24, 2012, 10:13:41 pm
  • ****
  • Ich schicke dich zur HOELLE ! ¡ ! ¡
    • Egypt
    • deuceovspadez.webs.com/
[Statedef -1]

[State ]
type=helper
trigger1=(stateno=0||stateno=5900)&&!ctrl&&!numhelper(20)
id=20
stateno=5150
keyctrl=1
ignorehitpause=1
pausemovetime=9999999
supermovetime=9999999

[State ]
type=assertspecial
trigger1=ishelper(20)
flag=invisible
ignorehitpause=1

[State ]
type=statetypeset
trigger1=ishelper(20)
movetype=i
ignorehitpause=1

[State ]
type=changeanim
trigger1=ishelper(20)
value=root,anim
ignorehitpause=1

[State ]
type=ctrlset
trigger1=ishelper(20)
value=0
ignorehitpause=1

[State ]
type=velset
trigger1=ishelper(20)
x=rootdist x
y=rootdist y
ignorehitpause=1

[State ]
type=parentvarset
trigger1=ishelper(20)
trigger1=stateno=5120
var(0)=1
ignorehitpause=1

[State ]
type=destroyself
trigger1=ishelper(20)
trigger1=time=100
ignorehitpause=1

[State ]
type=displaytoclipboard
trigger1=!ishelper
text="Training Mode = %d 0=No 1=Yes"
params=var(0)
ignorehitpause=1


[ 052012 ] Inazumachi 181/256  /  deviantART   /  2OS Grafphicsxz  Dead Anims ( Orochi/Mizuchi )  /  608's FX Volume 3
Re: Training Mode Detector
#2  August 25, 2012, 08:21:18 am
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
So, that means there is a hardcoded state change from 5150 to 5120 when in training mode? Nice to know.
I guess this is a safer and better method than checking the powerbar during intro.

2OS

Re: Training Mode Detector
#3  August 25, 2012, 08:42:00 am
  • ****
  • Ich schicke dich zur HOELLE ! ¡ ! ¡
    • Egypt
    • deuceovspadez.webs.com/
that pretty much sums it up yes.

it'll work if the intro is or is not skipped. the only ( not so major ) downside is it takes roughly 100 ticks upon spawn.


[ 052012 ] Inazumachi 181/256  /  deviantART   /  2OS Grafphicsxz  Dead Anims ( Orochi/Mizuchi )  /  608's FX Volume 3
Re: Training Mode Detector
#4  August 27, 2012, 04:06:36 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
I know this is kind of trivial for someone who's intending to use this type of code, but you could use the [ code ] tags and a short intro/comment each time :
- Create the helper in state XXX.
- This is the code for the helper itself : ...
- This line does this, this state does that.
- Put this in state -2 to display blabla.

This would make the tutorials much more understandable and easy to read. ;)
Re: Training Mode Detector
#5  August 28, 2012, 03:14:32 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Well it is the code library rather than tutorials. But explaining what is happening is always useful so if you want to tweak it you don't need to work out what bits of the code do.


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: Training Mode Detector
#6  November 17, 2012, 02:08:09 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
that pretty much sums it up yes.

it'll work if the intro is or is not skipped. the only ( not so major ) downside is it takes roughly 100 ticks upon spawn.

Hate to bring this back up, but I wanted to say something about this.
I think you're saying 100 ticks upon respawn because that is what is written in the code. If you wanted to change the time, couldn't you say something like 50, 10, or time > 0 instead? Or does it really need exactly 100 game ticks for this code to work?

Also, why 5150? I thought that was already used for something. Is it not? Wait.... Isn't 5150 the dead KO state?
Can it be any state number, or does it have to be 5150?

"You must defeat my flaming
dragon punch to stand a chance."
Re: Training Mode Detector
#7  November 17, 2012, 02:14:24 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Training mode forces a state change from 5150 to 5120, that is clear enough isn't it? Because of the way mugen works it takes 100 ticks to achieve this.

And of course you can't use another state. That's obviously not how this works.

If you have further questions redirect them to the dev help forum not here.


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: Training Mode Detector
#8  November 06, 2014, 05:39:00 am
  • ****
  • M.D.W.I.P.
    • Bahamas
    • www.mabskmk.webs.com
This work for me

Code:
[State -3];Demo mode
type=Varset
triggerall=!Var(10)
trigger1= (Stateno=190||Stateno=5900) && roundno=1 && Power>=1000 && Ailevel!=0 ;<--Mugen1.0+
v=10
value=1
[State -3];Demo mode error ;<--Only for same characters/fullgame+
type=Varset
triggerall=Var(10)
trigger1=Roundstate=2 && Enemy,var(10)=0
v=14
value=0
Re: Training Mode Detector
#9  November 06, 2014, 01:25:17 pm
  • ****
  • Hey.
    • Ukraine
    • mugencoder.com

  • Online
Dude, what's with the necro?

Also, your method isn't exclusively going to pin-point demo mode. Your conditions would be true for any character ready to do a standard, 1-bar super.

-[Все слова это только слова.]-