YesNoOk
avatar

Foresight (Read 3815 times)

Started by The Aboriginal One, January 22, 2007, 02:12:56 am
Share this topic:
Foresight
#1  January 22, 2007, 02:12:56 am
  • ******
  • I am a ghost.
    • USA
    • www.bmarquis.com
Foresight


By: The Aboriginal One.


Hey, ya'll. I'm Brandon Marquis Markail Green, A.K.A. The Aboriginal One, and today, I am going to teach you how to do a foresighting technique.

Foresight is an ability to predetermine an opponent's move. Using foresight, a player can either do a more special move, or automatically dodge or evade said attack.

Reading this tutorial means you know a little about M.U.G.E.N. CNS syntax, and you know how to do a simple move. The only prerequisites are that, and the knowledge of statedef -3 If you don't know statedef -3, that is a state that can only be executed when using own states. Congrats, you now have the prerequisites!

First, lets make a simple statedef.

[Statedef xxx]
type = S
physics = S
movetype = I
ctrl = 1
velset = 0
This is not etched in stone. You can change it to whatever you like. Next it's the Forsighting technique.

[State xxx, Foresight]
type = VarSet
trigger1 = 1
var(10) =  P2StateNo

This simple state just finds the state number of the target, or the nearest enemy  towards you, and adds it to var(10), or any variable, it doesn't matter, unless you are already using that variable, then it's a no-no. Also, this just gives the recent stateno, so remember to add triggers to adjust it so that you don't go willy-nilly on the idle stances.

Next, we'll use statedef -3 to automatically do something when that state is executed.

[State -3, Foresight]
type = ChangeState
trigger1 = P2StateNo = var(10)
value = YYY

As simple as that. Remember, that your variable will start with the value of 0, so you'll need a trigger like so.

Trigger1 = P2StateNo != 0

Now implement it on your character, and watch what happens. I implemented it of KFM, and he did his hyper Smash Kung-Fu Upper everytime someone did the low kick. Then I resetted it by pressing the button I implemented the move to and he did it as soon as someone crouched. Don't say I don't know M.U.G.E.N., and please give me reviews and join my forum. Peace and Love
Accusare nemo se debet nisi coram Veridis
DYNOMITE
Last Edit: January 22, 2007, 02:53:31 am by The Aboriginal One
Re: Foresight
#2  January 22, 2007, 03:41:02 am
  • ****
  • Am I evil?
Just tested it. It's really a nice feature. Nice thinking mate.  Although it could be abused, but bleh. I'm supposing this could go with a psychic type char, or your usual OMFGUBERLEETCHEAPBO$$.

Sig made by TempesT :)
Re: Foresight
#3  January 23, 2007, 06:45:23 pm
  • ***
    • kratos-kreations.webs.com/
Great and simple. This will be really good for people with little M.U.G.E.N. knowledge. I was planning to do something like this for my DBZ/GT full mugen game. Except you'll teleport behind the opponent and attack when they try to attack you. Again, nice tut. Looking forward to more.
Re: Foresight
#4  January 23, 2007, 06:47:47 pm
  • ******
    • Germany
that's kinda the simplest ai possible, and since it depends on statenumbers it's hardly useful :sadgoi:
Re: Foresight
#5  January 23, 2007, 07:18:20 pm
  • ******
  • I am a ghost.
    • USA
    • www.bmarquis.com
that's kinda the simplest ai possible, and since it depends on statenumbers it's hardly useful :sadgoi:

Shaza, It can be useful. It's simple, yes, but you can always make it as advanced as you want it to. Besides, sometimes the simple things are nice.

I was planning to do something like this for my DBZ/GT full mugen game. Except you'll teleport behind the opponent and attack when they try to attack you. Again, nice tut. Looking forward to more.

to do that...

[State -3, Foresight]
type = ChangeState
trigger1 = P2BodyDist <= ?
trigger1 = P2MoveType = A
trigger1 = Stateno = YYY
value = ZZZ

where YYY is the stateno you want to activate the forsight's capabilities, and ZZZ is the resulting coming-up-from-behind-and-bust-one-out-attack. it'll be a nice Warp Kamehameha Wave technique.
Accusare nemo se debet nisi coram Veridis
DYNOMITE
Re: Foresight
#6  February 12, 2007, 08:43:42 am
  • *
Great and simple. This will be really good for people with little M.U.G.E.N. knowledge. I was planning to do something like this for my DBZ/GT full mugen game. Except you'll teleport behind the opponent and attack when they try to attack you. Again, nice tut. Looking forward to more.

You could use it for Kid Buu or something like that.