YesNoOk

Show content

This section allows you to browse the content for this member. Note that you can only see content for which you have sufficient viewing permissions.

**
ttas is Offline
Contact ttas:

ttas

User

Messages by ttas

    

Re: helperID question (SOLVED)

 January 23, 2012, 08:15:07 am View in topic context
avatar  Posted by ttas  in helperID question (Started by ttas January 23, 2012, 05:01:43 am
 Board: M.U.G.E.N Development Help

Thanks!

In the meantime I think I found a work around actually.

For each type of blood effect, I just coded it so it knows which hit state I'm in and I've been hit by which move(s). So the specific blood effects triggers when I'm hit by the appropriate attacks.
    

Re: helperID question

 January 23, 2012, 05:17:48 am View in topic context
avatar  Posted by ttas  in helperID question (Started by ttas January 23, 2012, 05:01:43 am
 Board: M.U.G.E.N Development Help

p2stateno !=200, don't do if p2 state is 200.

Something like that.

I have a blood system coded in the state-2. The blood is activated when under certain conditions, but I just want it to not activate if I'm hit by fireballs/projectiles.

[state -2]
type = explod
triggerall = p2stateno !=205
triggerall = p2stateno !=215
trigger1 = anim = 5002 && animelem = 2
trigger2 = anim = 5030 && p2stateno = 260 && animelem = 2
trigger3 = anim = 5001 && p2stateno = 250 && animelem = 2

This is really the importaned part.

My helper projectile is ID = 4301 and I can't get it to NOT activate if the helper is what hits you. So how do I tell it like the !=200 above, to not make the blood if hit by the helper?
    

helperID question

 January 23, 2012, 05:01:43 am View in topic context
avatar  Posted by ttas  in helperID question (Started by ttas January 23, 2012, 05:01:43 am
 Board: M.U.G.E.N Development Help

I'm trying to ignore a helper projectile.
What trigger ignores it? I've tried triggerall = !numhelper(4301) but that doesn't seem to be correct.
I've tried helperID(4301) but it doesn't work.

What I'm trying to do is, when p2 gets hit, a bit of blood comes off, but I don't want it to for fireballs.
    

Re: AI won't stop blocking

 October 11, 2011, 08:56:32 am View in topic context
avatar  Posted by ttas  in AI won't stop blocking (Started by ttas October 11, 2011, 02:03:02 am
 Board: M.U.G.E.N Development Help

OK now it's working! Thank you so much though for your patience. Still funny I didn't even see all the trigger1's. I guess they all blurred together after a while.
    

Re: AI won't stop blocking

 October 11, 2011, 08:46:54 am View in topic context
avatar  Posted by ttas  in AI won't stop blocking (Started by ttas October 11, 2011, 02:03:02 am
 Board: M.U.G.E.N Development Help

Oh man! That's embarrassing. I didn't even notice that! lol  o_O

I've been looking at this stuff for too long.

I'll fix that and see what happens.
    

Re: AI won't stop blocking

 October 11, 2011, 07:56:14 am View in topic context
avatar  Posted by ttas  in AI won't stop blocking (Started by ttas October 11, 2011, 02:03:02 am
 Board: M.U.G.E.N Development Help

That all makes perfect sense, and that's what I've done. But for some reason beyond me, it's not activating.

Unless the exe I have is flawed, or I completely overlooked something, I don't know. As far as I can tell, it should be working, but completely refuses to activate.

Here is my stripped down CMD, with the move it refuses to activate
Code:

[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

;-| AI |---------------------------------------------------------------

[command]
name = "CPU1"
command = D, D, D, D, D, D, D, D
time = 1

[command]
name = "CPU11"
command = D, D, D, D, D, D, D, D,a
time = 1

[command]
name = "CPU12"
command = D, D, D, D, D, D, D, D,c
time = 1

[command]
name = "CPU2"
command = z, z, z, z, z, z, z, z
time = 1

[command]
name = "CPU13"
command = z, z, z, z, z, z, z, z,c
time = 1

[command]
name = "CPU14"
command = z, z, z, z, z, z, z, z,x
time = 1

[command]
name = "CPU3"
command = B, B, B, B, B, B, B, B,x
time = 1

[command]
name = "CPU15"
command = B, B, B, B, B, B, B, B,y
time = 1

[command]
name = "CPU16"
command = B, B, B, B, B, B, B, B,b
time = 1

[command]
name = "CPU4"
command = x, x, x, x, x, x, x, x
time = 1

[command]
name = "CPU17"
command = x, x, x, x, x, x, x, x,D
time = 1

[command]
name = "CPU18"
command = x, x, x, x, x, x, x, x,F
time = 1

[command]
name = "CPU5"
command = U, U, U, U, U, U, U, U,B
time = 1

[command]
name = "CPU19"
command = U, U, U, U, U, U, U, U
time = 1

[command]
name = "CPU20"
command = U, U, U, U, U, U, U, U,D
time = 1

[command]
name = "CPU6"
command = a, a, a, a, a, a, a, a,U
time = 1

[command]
name = "CPU21"
command = a, a, a, a, a, a, a, a,F, F, F,
time = 1

[command]
name = "CPU22"
command = a, a, a, a, a, a, a, a,F,F
time = 1

[command]
name = "CPU7"
command = F, F, F, F, F, F, F, F,b
time = 1

[command]
name = "CPU23"
command = F, F, F, F, F, F, F, F,a
time = 1

[command]
name = "CPU24"
command = F, F, F, F, F, F, F, F,D
time = 1

[command]
name = "CPU8"
command = b, b, b, b, b, b, b, b,b,c
time = 1

[command]
name = "CPU25"
command = b, b, b, b, b, b, b, b,c
time = 1

[command]
name = "CPU26"
command = b, b, b, b, b, b, b, b,a
time = 1

[command]
name = "CPU9"
command = y, y, y, y, y, y, y, y,z
time = 1

[command]
name = "CPU27"
command = y, y, y, y, y, y, y, y
time = 1

[command]
name = "CPU28"
command = y, y, y, y, y, y, y, y,x
time = 1

[command]
name = "CPU10"
command = s, s, s, s, s, s, s, s,x
time = 1

[command]
name = "CPU29"
command = s, s, s, s, s, s, s, s,y
time = 1

[command]
name = "CPU30"
command = s, s, s, s, s, s, s, s,a
time = 1

[command]
name = "CPU31"
command = x, s, s, s, s, s, s, s,b,z,a
time = 1

;-| Default Values |-------------------------------------------------------
[command]
name = ""
command = UF,x
time = 15

[Defaults]
[command]
name = ""
command = UF,x
time = 15

command.time = 30

[command]
name = ""
command = UF,x
time = 15

command.buffer.time = 1




;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery" ;Required (do not remove)
command = U,U,F,D,F,D,D,B,D,F,D,B,B,x,x,a,x,a,U
time = 0

[Command]
name = "recovery"
command = U,U,F,D,F,D,D,B,D,F,D,B,B,x,x,a,b,a,U
time = 0

[Command]
name = "recovery"
command = U,U,F,D,F,D,D,B,D,F,D,B,B,x,x,a,x,b,U
time = 0

[Command]
name = "recovery"
command = U,U,F,D,F,D,D,B,D,F,D,B,B,x,x,a,x,a,B
time = 0

[Command]
name = "recovery"
command = U,U,F,D,F,D,D,B,D,F,D,B,B,x,x,a,x,a,D
time = 0

[Command]
name = "recovery"
command = U,U,F,D,F,D,D,B,D,F,D,B,B,x,x,a,x,a,F
time = 0

;-| Dir + Button |---------------------------------------------------------
;Sweep
[Command]
name = "sweep"
command = /$B,x
time = 1

;Roundhouse
[Command]
name = "roundhouse"
command = /$B,y
time = 1

;Crouching Kick
[Command]
name = "down_x"
command = /$D,x
time = 1

;Crouching Kick
[Command]
name = "down_y"
command = /$D,y
time = 1

;Crouching Block
[Command]
name = "down_z"
command = /$D,z
time = 1

;Uppercut
[Command]
name = "down_a"
command = /$D,a
time = 1

;uppercut
[Command]
name = "down_b"
command = /$D,b
time = 1

;crouching block
[Command]
name = "down_c"
command = /$D,c
time = 1

;Throw
[Command]
name = "fwd_a"
command = /$F,a
time = 1

;-| Single Button |---------------------------------------------------------

;Low Punch
[Command]
name = "a"
command = a
time = 1

;High Punch
[Command]
name = "b"
command = b
time = 1

;Block
[Command]
name = "c"
command = c
time = 1

;Low Kick
[Command]
name = "x"
command = x
time = 1

;High Kick
[Command]
name = "y"
command = y
time = 1

;Block
[Command]
name = "z"
command = z
time = 1

[command]
name = "start"
command = s
time = 1

;-| Single Dir |------------------------------------------------------------

[Command]
name = "fwd" ;Required (do not remove)
command = $F
time = 1

[Command]
name = "down" ;Required (do not remove)
command = $D
time = 1

[Command]
name = "back" ;Required (do not remove)
command = $B
time = 1

[Command]
name = "up" ;Required (do not remove)
command = $U
time = 1

;-| Hold Button |--------------------------------------------------------------

[Command]
name = "blok"  ;Required (do not remove)
command = /z
time = 1

[Command]
name = "relase"
command = ~z

[Command]
name = "blok"  ;Required (do not remove)
command = /c
time = 1

[Command]
name = "relase"
command = ~c

[Command]
name = "holda"
command = /a
time = 1

[Command]
name = "holdb"
command = /b
time = 1

[Command]
name = "holdx"
command = /x
time = 1

[Command]
name = "holdy"
command = /y
time = 1

[Command]
name = "holdstart"
command = /s
time = 1

;-| Hold Dir |--------------------------------------------------------------

[Command]
name = "holdfwd" ;Required (do not remove)
command = /$F
time = 1

[Command]
name = "holddown" ;Required (do not remove)
command = /$D
time = 1

[Command]
name = "holdback" ;Required (do not remove)
command = /$B
time = 1

[Command]
name = "holdup" ;Required (do not remove)
command = /$U
time = 1




;-| States |--------------------------------------------------------------
[Statedef -1]

[state -1]
type = varset
triggerall = var(58) !=1
trigger1 = command = "CPU1"
trigger1 = command = "CPU2"
trigger1 = command = "CPU3"
trigger1 = command = "CPU4"
trigger1 = command = "CPU5"
trigger1 = command = "CPU6"
trigger1 = command = "CPU7"
trigger1 = command = "CPU8"
trigger1 = command = "CPU9"
trigger1 = command = "CPU10"
trigger1 = command = "CPU11"
trigger1 = command = "CPU12"
trigger1 = command = "CPU13"
trigger1 = command = "CPU14"
trigger1 = command = "CPU15"
trigger1 = command = "CPU16"
trigger1 = command = "CPU17"
trigger1 = command = "CPU18"
trigger1 = command = "CPU19"
trigger1 = command = "CPU20"
trigger1 = command = "CPU21"
trigger1 = command = "CPU22"
trigger1 = command = "CPU23"
trigger1 = command = "CPU24"
trigger1 = command = "CPU25"
trigger1 = command = "CPU26"
trigger1 = command = "CPU27"
trigger1 = command = "CPU28"
trigger1 = command = "CPU29"
trigger1 = command = "CPU30"
trigger1 = command = "CPU31"
v = 58
value = 1



;-|Basic Moves|------------------------------------

; High Punch 1
[State -1, High Punch1]
type = ChangeState
value = 220
triggerall = var(58) !=1
triggerall = command = "b"
trigger1 = statetype = S
trigger1 = ctrl


[state -1, AI High Punch 1]
type = changestate
triggerall = var(58) = 1
triggerall = statetype = S
trigger1 = ctrl
value = 220



Tell me I've overlooked something here.
    

Re: AI won't stop blocking

 October 11, 2011, 06:04:29 am View in topic context
avatar  Posted by ttas  in AI won't stop blocking (Started by ttas October 11, 2011, 02:03:02 am
 Board: M.U.G.E.N Development Help

One thing I don't understand is exactly how the AI Activation code actually activates the AI?

type = varset
trigger1 = command = "CPU1"
v = 58
value = 1

What I understand is that the moves you program with Var(58)=1 means that Variable 58 has to be active first, in order to do the move. But how does the above code actually turn this on? Is it when the CPU decides to use one of the "CPU" commands?  But when does it decide to use one of these?

And also what I don't understand is, if I go an change the CPU1 command and give it F,F with a time of 100, which I can do, it doesn't do the move either. But of course if I change the Var to = 0 it will.

So maybe explaining how this AI Activation code works might give me some insight into what's going wrong here.

Any tutorials I've been reading about it basically tell you to "paste this code" "do this and then that" but don't explain why, how or anything.
    

Re: AI won't stop blocking

 October 11, 2011, 05:03:23 am View in topic context
avatar  Posted by ttas  in AI won't stop blocking (Started by ttas October 11, 2011, 02:03:02 am
 Board: M.U.G.E.N Development Help

I've tried that. I've ultimately disabled every move except one move supposed to be controlled by the AI. All they will do is jump around a lot without even throwing a single punch. I just let the timer run out in both rounds. I hate when stuff like this doesn't make sense.

Var(58) isn't being used by anything else, I've checked over my code and I've tried different triggers. But alas, it still won't activate.
 :???: :???:
    

Re: AI won't stop blocking

 October 11, 2011, 04:41:10 am View in topic context
avatar  Posted by ttas  in AI won't stop blocking (Started by ttas October 11, 2011, 02:03:02 am
 Board: M.U.G.E.N Development Help

Okay I think it's more an issue of the AI not activating. I;ve tried including another ai attack making him punch air constantly, but it won't even do that.

Any ideas why the AI isn't activating?

Thanks so far for your help.

I'll try a few more things while I wait to hear from you and let you know.
    

Re: AI won't stop blocking

 October 11, 2011, 03:14:08 am View in topic context
avatar  Posted by ttas  in AI won't stop blocking (Started by ttas October 11, 2011, 02:03:02 am
 Board: M.U.G.E.N Development Help

ok I made the changes that you mentioned, and it makes sense, but for some reason Mugen doesn't think it does. He seems to still block all the time. I've had an issue here before with AI, and I still am not able to figure out what I'm doing wrong.

Correct me if I'm wrong but isnt triggerall = var(58) =0 supposed to mean the cpu is NOT supposed to use this move and var(58) = 1 means it's supposed to use it? Granted the conditions are right?

If so, how would I force the cpu to NOT use the block at all, and just me be able to use it?


I also have
[state -1]
type = varset
triggerall = var(58) = 1 (i even tried !=1)
trigger1 = command = "cpu1"
etc etc

v = 58
value = 1
    

AI won't stop blocking

 October 11, 2011, 02:03:02 am View in topic context
avatar  Posted by ttas  in AI won't stop blocking (Started by ttas October 11, 2011, 02:03:02 am
 Board: M.U.G.E.N Development Help

My characters have a block button, and the AI is using it constantly. An entire fight they do the "block dance" as I've named it. Blocking standing then crouch blocking then back to stand blocking. Occasionally they will jump or punch but the timer runs out and they've done only a few hits.

I've tried programming the AI to use block on only certain occasions, and used the AI disable code on MY block command. I realize WinMugen's AI is shit, but without completely removing block from my game, how would I stop them from abusing this ONE button?

CMD
===
Code:
[state -1]
type = changestate
value = 120
triggerall = var(58) = 0
triggerall = command = "block"
triggerall = ctrl
trigger1 = statetype = S
trigger2 = statetype = C && statetype !=A

[state -1]
type = changestate
value = 120
triggerall = var(58) = 1
triggerall = ctrl
trigger1 = p2bodydist x <= 50
trigger1 = random <=100
trigger1 = statetype = S && statetype !=A
trigger2 = statetype = C && statetype !=A



Did I screw up in the triggers somewhere?
    

Re: AI help, not working, being ignored by mugen

 October 04, 2011, 02:04:17 am View in topic context
avatar  Posted by ttas  in AI help, not working, being ignored by mugen (Started by ttas October 02, 2011, 05:01:02 am
 Board: M.U.G.E.N Development Help

Thank you very much for you're help. I'll try some more commands and see what happens.
    

Re: AI help, not working, being ignored by mugen

 October 04, 2011, 12:14:48 am View in topic context
avatar  Posted by ttas  in AI help, not working, being ignored by mugen (Started by ttas October 02, 2011, 05:01:02 am
 Board: M.U.G.E.N Development Help

Thank you for responding.
I made a typo in my post, the "cpu" is actually "cpu1". whoops!
I've taken out the "command" now.

I've got the AI to activate now. After about 40 seconds into the fight P2 starts to punch air continuously. That was on purpose to see if it would actually happen at all (something that I couldn't mistake as NOT AI).
So one final question on the subject, (and I apologize if I have to many "help me" posts, still learning this all,)
But is there a time when is the AI is supposed to kick in by? I mean when I start the round, it's never immediate, but most cases after 30-40 seconds or even not until the second round it will kick in. Is there a way to make sure it kicks in sooner? Or is the slowness due to the fact that I only have one AI move set right now?

Thank you again for all the times you've helped/responded to my other posts.
    

AI help, not working, being ignored by mugen

 October 02, 2011, 05:01:02 am View in topic context
avatar  Posted by ttas  in AI help, not working, being ignored by mugen (Started by ttas October 02, 2011, 05:01:02 am
 Board: M.U.G.E.N Development Help

EDIT: So I've decided to re-write my whole problem.

I've looked everywhere online for information on AI coding. Seems simple enough to get at least something to happen. But for some reason, not.

I've used the AI Activation code and the appropriate codes to setup up my attacks with the AI. Then I got frustrated and disabled every single move but 2 just to see what is happening.

[State -1]
type = changestate
value = 200 ; a light punch
triggerall = var(9) !=1 ; AI is supposed to not use this move
trigger1 = command = "b"
trigger1 = statetype = S
trigger1 = ctrl

[state -1]
type = changestate
value = 220 ; high punch
triggerall = command = "cpu1"; AI is supposed to be using this move
triggerall = (roundstate = 2) && (var(9) =1)
triggerall = (ctrl) && (statetype = S)
trigger1 = statetype != A
trigger1 = random <= 999; I even had this at one time as well as 500


What's happening besides a lot of attackless jumping around, is AI is using the light punch a lot and actually rarely uses the high Punch.




If you need to know the Activation code and other stuff is

[command]
name = "cpu1"
command = F,F,F,F,F
time = 1

and

[state -1]
type = varset
trigger1 = command = "cpu"
v = 9
value = 1



Is my mugen somehow broken, where it ignores the AI 99% of the time.
    

Re: !var(59) problem, only kill certain chars, odd problem

 October 01, 2011, 10:40:23 am View in topic context
avatar  Posted by ttas  in !var(59) problem, only kill certain chars, odd problem (Started by ttas October 01, 2011, 02:23:49 am
 Board: M.U.G.E.N Development Help

Sorry if I didn't make sense before, I've been working on this damn code for 4 days or so.  :o

But I figured it out,

just add extra entries in the state -2

[state -2]
type = varset
trigger1 = p2name = "charsname"
v = 59
value = 0

underneath the varset's with the value = 1 and it seemed to solve the whole issue.
    

Re: !var(59) problem, only kill certain chars, odd problem

 October 01, 2011, 07:36:20 am View in topic context
avatar  Posted by ttas  in !var(59) problem, only kill certain chars, odd problem (Started by ttas October 01, 2011, 02:23:49 am
 Board: M.U.G.E.N Development Help

Won't that COMPLETELY disable the finishing move state?
I only wanted to do that for certain characters, not remove it entirely from the game.

    

Re: !var(59) problem, only kill certain chars, odd problem

 October 01, 2011, 06:55:07 am View in topic context
avatar  Posted by ttas  in !var(59) problem, only kill certain chars, odd problem (Started by ttas October 01, 2011, 02:23:49 am
 Board: M.U.G.E.N Development Help

I've been trying to get this finishing move system to work correctly for 4 days now.

This is the last bug in this system to iron out only, I can't figure out what the fix is. Can you see anything in this?

Here is the punch
Code:
; Low Punch 1
[Statedef 200, LP1]
type    = S ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A ;Move-type: A-attack, I-idle, H-gethit
physics = S ;Physics: S-stand, C-crouch, A-air
juggle  = 1 ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0 ;Set velocity (x,y) (Def: no change)
ctrl = 0 ;Set ctrl (Def: no change)
anim = 200
sprpriority = 2 ;Set layering priority to 2 (in front)

[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S2,0
volume = 100

[State 200, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S4,0
volume = 100

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA ;Attribute: Standing, Normal Attack
damage = 50, 200 ;Damage that move inflicts, guard damage
animtype = Light ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA ;Flags on how move is to be guarded against
hitflag = MAF ;Flags of conditions that move can hit
priority = 3, Hit ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 0, 0 ;Time attacker pauses, time opponent shakes
sparkno = -1 ;Spark anim no (Def: set above)
sparkxy = -10, -76 ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S1, 3 ;Sound to play on hit
guardsound = 6, 0 ;Sound to play on guard
ground.type = High ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 0 ;Time that the opponent slides back
ground.hittime  = 19 ;Time opponent is in hit state
ground.velocity = 0 ;Velocity at which opponent is pushed
airguard.velocity = -0,0 ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = trip ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -2,-3   ;*** Add this line ***
;Y-velocity at which opponent is pushed
air.hittime = 12 ;Time before opponent regains control in air
fall.recover = 0
[b]kill = !var(59) || 1*p2stateno = 987123[/b]


[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1



The "finish him" state

Code:
 ; Your char calls the helper right now
[Statedef 9000]
type    = S
movetype= I
physics = S
juggle  = 4
ctrl = 1
velset = 0,0,0

;Screen is red
[State 9000, 2]
type = BGPalFX
trigger1 = Time = 0;>= 63
time = 99999
add = 0,-200,-200
mul = 256,256,256
sin = 40,80,40

[state 9000]
type = playsnd
trigger1 = time = 0
value = S7,3
volume = -255
channel = 5

; Finishing state CLSN helper
[State 9000, 1]
type = Helper
trigger1 = 1
trigger1 = NumHelper(9010) = 0 ; If there's no other Finish Hims on the screen, it pops up
ID = 9010 ; IMPORTANT!
pos = 160, -140
postype = left
stateno = 9010
helpertype = normal
name = "Finish Him!!"
keyctrl = 0
ownpal = 1

; Back to stand position
[State 9000, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 9001]
type = S
physics = S
sprpriority = 4

[State 9001, 1]
type = ChangeAnim
triggerall = prevstateno != 10001
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0
persistent = 0

[State 9001, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = Abs(Vel x) < 2
trigger2 = Time = 4
x = 0
y = 0

; Helper: Finish Him!! (invisible)
[Statedef 9010]
type = S
movetype = A
physics = S
anim = 9010
velset = 0,0
ctrl = 1

[state 9010]
type = assertspecial
trigger1 = 1
flag = timerfreeze

; Hitting the whole screen
[State 9010, 3]
type = HitDef
trigger1 = AnimElem = 1
trigger1 = P2StateType != A
attr = S, SP
damage = 0,0
animtype = Heavy
getpower = 10
givepower = 25
hitflag = MF
guardflag = A
priority = 7
pausetime = 0,2
sparkxy = 0,0
sparkno = -1
gurad.sparkno = -1
hitsound = -1
guardsound = -1
ground.type = High
ground.slidetime = 0
ground.hittime = 0
ground.velocity = 0
air.velocity = 0
air.fall = 1
fall = 0
p2stateno = 987123 ; P2 changes to a custom state!
numhits = 0

; Helper: Finish Him!! (message)
[Statedef 9011]
type = S
movetype = A
physics = S
anim = 9011
velset = 0,0
ctrl = 1

[state 9011]
type = playsnd
trigger1 = time=1
value = S7,0
volume = 255

[State 9011, SprPriority]
type = SprPriority
trigger1 = 1
value = 7

[State 9011, ChangeAnim]
type = ChangeAnim
trigger1 = time = 50
value = 9012

; It destroys when P2 dies
[State 9011, 3]
type = DestroySelf
trigger1 = animelem = 14

[State 9011, 3]
type = DestroySelf
trigger1 = P2Life <= 0

; Dizzy (Before a Fatality, with a "timer")
[Statedef 987123]
type    = S
movetype= H
physics = S
juggle  = 2
ctrl = 0
velset = 0,0

; Setting enemy's life to 1
[State 987123, 1]
type = LifeSet
trigger1 = 1
value = 1

; P1 (your character) gains a bit more of life, excluding the possibility of a Draw Game
[State 987123, 1]
type = TargetLifeAdd
trigger1 = P2life <= 1
value = 1

; After 600 ticks and with no fatality, p2 dies
[State 987123, 1]
type = LifeSet
trigger1 = P2StateNo != [10000,10100] ; use the numbers of your character's fatality states
trigger1 = Time = 600
value = 0

; After 600 ticks and with no fatality, p2 falls down
[State 987123, 1]
type = SelfState
trigger1 = P2StateNo != [10000,10100]
trigger1 = Time = 600
value = 5050
ctrl = 0

; If P1 (your character) does a fatality, the timer STOPS, so he can make the fatality without problems
[State 987123, 1]
type = ChangeState
trigger1 = P2StateNo = [10000,10100]
value = 987124
ctrl = 0

; Dizzying animation
[State 987123, 2]
type = ChangeAnim
trigger1 = AnimExist(5300)
trigger1 = Anim != 5300
value = 5300

; Dizzy, without "timer"
[Statedef 987124]
type    = S
movetype= H
physics = S
juggle  = 2
ctrl = 0
velset = 0,0,0

; Dizzying animation
[State 987124, 2]
type = ChangeAnim
trigger1 = AnimExist(5300)
trigger1 = Anim != 5300
value = 5300



The finishing move itself

Code:
[Statedef 3000]
type = S
movetype= A
physics = S
juggle = 1
velset = 0,0
anim = 10000
ctrl = 0

[state 3000]
type = stopsnd
trigger1 = time = 0
value = S7,3
channel = 5

[state 3000]
type = HitDef
trigger1 = Time = 0
attr = S, NA ;Attribute: Standing, Normal Attack
damage = 0 ;Damage that move inflicts, guard damage
animtype = back ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA ;Flags on how move is to be guarded against
hitflag = MAF ;Flags of conditions that move can hit
priority = 3, Hit ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 0, 0 ;Time attacker pauses, time opponent shakes
sparkno = -1 ;Spark anim no (Def: set above)
sparkxy = -10, -76 ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = S1,4 ;Sound to play on hit
ground.type = High ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 0 ;Time that the opponent slides back
ground.hittime  = 0 ;Time opponent is in hit state
ground.velocity = 0 ;Velocity at which opponent is pushed
;Y-velocity at which opponent is pushed
air.hittime = 12 ;Time before opponent regains control in air
fall.recover = 0
p2stateno = 51000

;Screen is dark(optional).
[State 3000, 2]
type = BGPalFX
trigger1 = Time = 0
time = 99999
add = 0,0,0

;Stand comes back.
[State 3000, 4]
type = ChangeState
trigger1 = AnimTime = 0
value =9001; 0
ctrl = 1


the State -2 stuff
Code:
[State -2, 0]
type = varset
trigger1 = Win = 1 ; this will only be activated if you won at least 1 round.
trigger1 = NumHelper(9010) = 0
v = 59
value = 1

; When p2 dies, it resets
[State -2, 1]
type = varset
trigger1 = Win = 1
trigger1 = NumHelper(9010) = 1
trigger1 = p2life != 1
v = 59
value = 1

; All this does is make sure P2 is dead at ?? some point ??
[State -2, 5]
type = AttackMulSet
triggerall = !Var(59) && p2life <= 1
trigger1 = RoundNo != 1 && Win=0
trigger2 = p2stateno = 987123
value = 9999

; Finish Him (message)
[state -2, 1]
type = Helper
trigger1 = NumHelper(9010) = 1 ; invisible one ought to be ON the screen
trigger1 = NumHelper(9011) = 0 ; this one shouldn't be ON the screen
trigger1 = enemy(0), stateno = 987123 ; enemy have to be in this state
ID = 9011 ; IMPORTANT!
pos = 160, -140
postype = left
stateno = 9011
helpertype = normal
name = "Finish Him!! MSG"
keyctrl = 0
ownpal = 1

and finally the CMD part

Code:
[State -1]
type = Changestate
value = 9000
triggerall = P2Life <= 1 ; P2 must be on the ending of his life!
triggerall = NumHelper(9010) = 0 ; No other "Finish Hims" on the screen
triggerall = p2stateno != 987123 ; P2 can't be in this state!
triggerall = RoundNo != 1 ; Round can't be the first!
triggerall = var(59) >= 1 ; You must have won a round before!
trigger1 = ctrl ;= 1
trigger1 = statetype = S ; You can't be flying!
trigger1 = (p2statetype = S) || (p2statetype = C) ; P2 can't be floating!


; A fatality
[State -1, fatality]
type = Changestate
value = 3000;10000
triggerall = P2Life = 1
triggerall = NumHelper(9010) = 1 ; Finish Him must be on the screen
triggerall = enemy(0), stateno = 987123 ; P2 must be in this state
triggerall = RoundNo != 1 ; Round can't be the first
triggerall = var(59) >= 1 ; You should have on a round before
trigger1 = command = "armorfin111" ; the command
trigger1 = ctrl = 1
trigger1 = statetype = S
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2bodydist X > 100 && p2bodydist X < 200
    

!var(59) problem, only kill certain chars, odd problem

 October 01, 2011, 02:23:49 am View in topic context
avatar  Posted by ttas  in !var(59) problem, only kill certain chars, odd problem (Started by ttas October 01, 2011, 02:23:49 am
 Board: M.U.G.E.N Development Help

I've been working with finishing moves, and I wanted to not be able to do them to certain chars (like boss chars).

I have it worked out that if p2name !="name here", the "finish him" state won't ever appear while fighting that char, but at the end of the second round, none of my hits will actually KO the char and I can't end the round.

I'm using the kill = !var(59) || 1*p2stateno = #### in the hitdef's on all of my moves, but in the varset itself do I change something so I can actually finish the round against these chars?

I tried creating a separate state for one of my basic punches and triggered it only if against that char and removed the kill = !var(59) thingy, but it didn't do anything.

[state -2]
type = varset
trigger1 = win = 1
trigger1 = NumHelper(9010) = 0
v = 59
value = 1

[state - 2]
type = varset
trigger1 = win = 1
trigger1 = NumHelper(9010) = 1
trigger1 = p2life != 1
v = 59
value = 1

[state -2]
type = attackmulset
triggerall = !var(59) && p2life <= 1
trigger1 = roundno != 1 && win=0
trigger2 = p2stateno = 987123
value = 9999


 
    

Re: How to trigger low health P1?

 October 01, 2011, 02:04:36 am View in topic context
avatar  Posted by ttas  in How to trigger low health P1? (solved) (Started by ttas October 01, 2011, 01:04:09 am
 Board: M.U.G.E.N Development Help

Alright thanks!!
    

How to trigger low health P1? (solved)

 October 01, 2011, 01:04:09 am View in topic context
avatar  Posted by ttas  in How to trigger low health P1? (solved) (Started by ttas October 01, 2011, 01:04:09 am
 Board: M.U.G.E.N Development Help

I have a warning meter that appears when the players life falls below 50.

I've got it to work somewhat but I can't properly trigger it the way I want.
On the first helper I have a trigger for P2Life <= 50, and it shows when P2 has low life, BUT since there is no P1Life, I can't trigger it if P1's life is low. I've tried life <= 50 but then it just triggers the helper for P1's meter even if P2 has low life.

How to I trigger it without "P1Life <= 50"

EDIT: Actually, I just tested it again, and there is a loop hole happening, where the P2 life low helper triggers even if P1;s life is low. Damn!

Now how do I trigger each on individually?