YesNoOk
avatar

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

Started by TigerTournament, October 01, 2011, 02:23:49 am
Share this topic:
!var(59) problem, only kill certain chars, odd problem
#1  October 01, 2011, 02:23:49 am
  • **
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: !var(59) problem, only kill certain chars, odd problem
#2  October 01, 2011, 02:43:51 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Don't know enough about how you've managed it.

Look at the value on Kill, i'm assuming it's an expression of some sort. Change whatever the expression requires to be 1 while fighting the boss characters. It may be as simple as having it on all the time and disabling the finishhim stuff.


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: !var(59) problem, only kill certain chars, odd problem
#3  October 01, 2011, 06:55:07 am
  • **
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
Re: !var(59) problem, only kill certain chars, odd problem
#4  October 01, 2011, 07:23:47 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Quote
[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
var(59) has to = 0 for the kill to be active. You have it set to 1 at all times. Make it 0 and disable the finish him changestate.


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: !var(59) problem, only kill certain chars, odd problem
#5  October 01, 2011, 07:36:20 am
  • **
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
#6  October 01, 2011, 07:49:07 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Guah. Disable it for those characters then. You thought that up earlier. You just need to do it differently.


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: !var(59) problem, only kill certain chars, odd problem
#7  October 01, 2011, 10:40:23 am
  • **
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.