YesNoOk
avatar

Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha) (Read 713 times)

Started by Daimonmau, April 28, 2009, 06:18:11 pm
Share this topic:
Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#1  April 28, 2009, 06:18:11 pm
  • ***
Ok, I din't want to post again so soon, but I searched on google and here and din't find the explanation fr this: How I make one specific var, if activated on the first round, to keep activated on the other rounds after the first? I know that I have to do something on the statedef 5900, but what I do there to keep this var (7) activated (the AI var)?

And I only knew the "impossiblecommands" method of activation, but then I made some research yesterday, downloaded some tutorials and stuff, and see that there is others. but this others, while they are better than the impossible commands, they ask for lots of codes, vars, positions, etc to work (and people where saying that they are not "foolprof" unles you use more than one of they at same time to have garanty (wich means more codes here and there).
I was going to use they, but then I read that is possible to let the AI activated ater the first round, wich means the diference btwin the "impossible commands" and the "full of codes AI activation" is just some seconds on the first round? off course this could mean the defeat of the char on the first round, but only sometimes.

so, I am right on this or I really should put the "full of codes AI activation"?

EXTRA: and one quick question, I still don't know how to make the AI know when the enemy has send a projectile (or helper projectile), detect his speed and if it's a 1 or 2 or more hits fireball.
Last Edit: April 28, 2009, 06:23:12 pm by daimonmau
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#2  April 28, 2009, 07:52:40 pm
  • ******
    • www.mugenguild.com/pots/
What I like to do is set these constants to these values:
[mcode];Variables with this index and above will not have their values
;reset to 0 between rounds or matches. There are 60 int variables,
;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
;If omitted, then it defaults to 60 and 40 for integer and float
;variables repectively, meaning that none are persistent, i.e. all
;are reset. If you want your variables to persist between matches,
;you need to override state 5900 from common1.cns.
IntPersistIndex = 60
FloatPersistIndex = 40[/mcode]
...then resetting each one manually if/when needed.

For the AI activation the impossible commands should be enough, just a bit slow to activate.  But you could/should add the simplest most effective of them all to it, the IsHomeTeam method.

Last question, sadly the only trigger Mugen has for that is "enemy,numproj", can't really detect any of those other things you mentioned.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#3  April 28, 2009, 08:42:54 pm
  • ***
hum... so what do I do in state 5900 to keep the var(7) on if it's on? I din't get your explanation, I have to erase the reset codes on 5900 and make something like this (while cheking other variables that need to be reset betwn rounds)?
varset
trigger1 = (roundno > 1) && (var(7) = 1)
v = 7
value = 1

and about the projs: so what are my limitations in relation to the AI? I can make the char knows when the enemy has send a proj, but can I detect his distance of the char? If I want the char to do a certain special move that destroy a proj or a dodge move, what I can write as a trigger?

EDIT: ahh, and I forgot to say, when I was searching yesterday about other activations, there was a topic where I downloaded a tutorial from a guy named "winame" I think. in this tutorial there is this hometeam, so I will read and add later, but on this same topic, if I remember right, you was there saying something that this hometeam don't work on certain situations... but I don't remember which ones (and I am not in home righ now), so, what is this "flaws" of this system?
Last Edit: April 28, 2009, 09:02:41 pm by daimonmau
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#4  April 28, 2009, 10:30:43 pm
  • ******
  • [E]
    • Mexico
Have you opened an actual state 5900 ?
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#5  April 28, 2009, 10:34:48 pm
  • ******
    • www.mugenguild.com/pots/
hum... so what do I do in state 5900 to keep the var(7) on if it's on? I din't get your explanation, I have to erase the reset codes on 5900 and make something like this (while cheking other variables that need to be reset betwn rounds)?
varset
trigger1 = (roundno > 1) && (var(7) = 1)
v = 7
value = 1
For this case I don't think you need to override State 5900, but it wouldn't hurt if you did (also what [E] there said ;P).

Quote
and about the projs: so what are my limitations in relation to the AI? I can make the char knows when the enemy has send a proj, but can I detect his distance of the char? If I want the char to do a certain special move that destroy a proj or a dodge move, what I can write as a trigger?
You can only detect how many of them there are, and that's it. Pretty useless in most cases.

Quote
EDIT: ahh, and I forgot to say, when I was searching yesterday about other activations, there was a topic where I downloaded a tutorial from a guy named "winame" I think. in this tutorial there is this hometeam, so I will read and add later, but on this same topic, if I remember right, you was there saying something that this hometeam don't work on certain situations... but I don't remember which ones (and I am not in home righ now), so, what is this "flaws" of this system?
It only works in Arcade and Survival, and only after the first match (not round, match), but in the situations it works it works really well.  And it's only one Sctrl anyway, doesn't take any space.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#6  April 28, 2009, 10:54:18 pm
  • ***
konata, you mean if I know what is writen of the statedef 5900? off course.

brokenpots, what? I presume you are assuming I know something that I don't know. to make the aswer more simple, just tellme how I do to make a specific var not reset betwn rounds (I was assuming it was something that I have to put in the state 5900)

and about the projs and stuff, I will let one move on the char that will kind of deflect projs, but the thing now is how I will make the AI for this move? how I will code the char to go to this move just before a proj hit him? this can't be done?

EDIT: about the IsHomeTeam activation... ok, I will add it.
Last Edit: April 28, 2009, 10:59:19 pm by daimonmau
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#7  April 28, 2009, 11:05:06 pm
  • ******
  • [E]
    • Mexico
it's nopt something you put in state 5900, it's something you take out of it.
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#8  April 28, 2009, 11:22:53 pm
  • ***
ok konata, but if it's evident that I don't know what is that I have to take off you could have said what I have to take off on this aswer that you just posted.
I am not in home right nowto test, but yesterday I made one test where I disabled the reset codes of the vars and float vars and put that, if this var(7) is on then it stays on, but when  tested it din't work.
Or it is this that I have to do an it should have worked (wich means I must have made something wrong on the test from yesterday)?
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#9  April 28, 2009, 11:43:17 pm
  • ******
  • [E]
    • Mexico
most likely, yes.
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#10  April 29, 2009, 05:14:03 am
  • ***
You need to increase the details on you explanations konata.

ok, this is how I let the 5900:

[Statedef 5900]
type = S

;[State 5900, 1] ;Clear all int variables
;type = VarRangeSet
;trigger1 = roundsexisted = 0
;value = 0

;[State 5900, 2] ;Clear all float variables
;type = VarRangeSet
;trigger1 = roundsexisted = 0
;fvalue = 0

[State 5900, VarSet]
type = VarSet
trigger1 = var(7) = 1
v = 7
value = 1

[State 5900, 3] ;Intro for round 1
type = ChangeState
trigger1 = roundno = 1
value = 190

and it din't work, so could someone explain or show to me how it must be done?
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#11  April 29, 2009, 04:33:04 pm
  • ******
  • [E]
    • Mexico
it should work, even if your varset is completely redundant; now try editing the cns, it should explain how to set the var resetting, since the vars are reset in two places, both in the state 5900 and in the constants part of the cns, it says something like intpersist index.
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#12  April 29, 2009, 09:26:36 pm
  • ***
ahh, now it worked. I put the 2 intpersist index to 0 and reset manually in the state 5900 the vars that need to be reset. thanks men.

and about that other doubt mine, so I don't create a new topic for this:
I will put one move on my char that, when he does the move and is hit by a projectile, he will then throw a proj really fast.
but the probelm is: how I will make the AI for this move? how I do to make he detect when the enemy proj is about to hit him? by what the brokenpots said, if I understod right, I can't do this?
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#13  April 29, 2009, 10:28:34 pm
  • ******
  • [E]
    • Mexico
yeah, you can't the best you can do is an educated guess but even that is very troublesome and unreliable.
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#14  April 30, 2009, 05:15:08 am
  • ***
hum... then I will make that, when the enemy throws a proj and if the char is on the floor, infront of him and kind of close then he will do the move. but even so, if the proj of the enemy be one really slow/fast the the char will probably get hit... but I will make that kind of rarelly he will utilize this move, better than let the AI unable to use this move.
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#15  April 30, 2009, 04:51:55 pm
  • ******
  • [E]
    • Mexico
You can try to make a list of enemies based on your favorite characters and their projectile throwing state.

like:

type= changestate
value = projreversal
triggerall = whatever you alreayd have there
triggerall = control = 1 and  statetype!=A
trigger1 = enemynear, name= "iori" %% enemynear,stateno= shooting projectile && enemnear,animelemno(0) = last frame or so of projectile shooting animation.
trigger2 = enemynear, name= "kyo" %% enemynear,stateno= shooting projectile && enemnear,animelemno(0) = last frame or so of projectile shooting animation.

you might want to add some author names in the triggers as wel as distance triggers.
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#16  May 01, 2009, 05:27:16 am
  • ***
hum... yeah, but no good to me. like my old char I want this one to be able to defeat certain hard chars but thanks to his general AI, and not to specific AI codes like "when this hardchar does his shoryuken special from this distance you make the dodge to this side and attack", hahaha.

but could you explain to me this thing you write:

"value = projreversal": I din't know this one, what it is for? or you just mean that is here I would put the state number of the reversalmove?

"enemynear": what it serves for? measure distance? but how much?

"stateno= shooting projectile && enemnear,animelemno(0) = last frame or so of projectile shooting animation.": this one I din't get. and "shooting projectile" is a code?

EDIT: I was forgeting that there is one thing that maybe I will do, a super "almost god mode" on the char that activates when he faces certain extreme hard enemies, like god orochi or maybe rare akuma (not making him immortal, but much more resistent and powerful, to try to make things more equal, hahaha)
Last Edit: May 01, 2009, 05:31:57 am by daimonmau
Re: Keep Ai var btwin rounds and wich one to use (+1 extra doubt, haha)
#17  May 01, 2009, 09:03:52 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
The DOCS are your friends at the moment.

The only one there i'm going to bother to explain is

value = projreversal

It's a changestate, value takes a number. [E] doesn't know what number you want to use so he's just filled it in with "projreversal" as a word, in this situation it means about the same as glipdobng


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.