1°) Stop bumping your own topic. You won't live fame with this.
I call it civil disobedience, just without the significance. 8) 8)
Anyway, it just occurred to me, might anyone find this useful?:
; CMD, wherever
[Command]
name = "AIswitch"
command = s,s ; Or change this to whatever, if you're using this command string for another command.
time = 12
; CMD, under [StateDef -1]
[State -1, AI Switch Helper Check]
type = ChangeState
trigger1 = IsHelper(9740)
value = 9740
; ST, under [StateDef -3]
[State -3, AI Switch Helper]
type = Helper
trigger1 = !NumHelper(9740)
trigger1 = RoundState = 2
trigger1 = Alive
HelperType = normal
name = "AI Switch"
ID = 9740
pos = 9999999,99999
StateNo = 9740
KeyCtrl = 1
PauseMoveTime = 2147483647
SuperMoveTime = 2147483647
; ST, wherever
[StateDef 9740]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0
[State 9740, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0
[State 9740, Switch]
type = ParentVarSet
trigger1 = command = "AIswitch"
;Enable the next line if you only want to be able to switch while you're in control of the character.
;trigger1 = Parent,command = "AIswitch"
var(59) = !(Parent,var(58)) ; Assuming var(58) is your primary AI variable.
[State 9740, Sayonara]
type = DestroySelf
trigger1 = !(Parent,Alive)
trigger2 = RoundState != 2
With this, you should be able to turn the AI on or off simply by hitting Start twice (or whatever) on player 1's controls whenever your character's TeamSide=1 (except when P2 in Team Co-op mode), or on player 2's controls whenever your character's TeamSide=2 (and when P2 in Team Co-op mode). And the CPU won't ever be able to do the same. You should definitely remove this bit of code before releasing a character. But assuming it works (haven't actually tested it yet--too lazy), it might make testing your character a little easier.
Edit: Mind you, this'll only work properly in DOS Mugen. In newer Mugen versions, KeyCtrl helpers occasionally detect CPU-issued commands, thus allowing the CPU to occasionally toggle the AI switch when in control.
Still quite busy.
(Yes, I intend to deal with that stuff eventually, but kinda can't just yet, sorry. :/ )
Last Edit:
February 15, 2006, 09:18:24 am by :nink: