YesNoOk
avatar

adding from another character (Read 775 times)

Started by eishiba, December 15, 2019, 12:10:45 am
Share this topic:
adding from another character
#1  December 15, 2019, 12:10:45 am
  • avatar
  • **
    • USA
So I want to add how another character uses an attack to mine. The characters attack I want to use they charge forward with spikes on their elbows and runs across the screen. The attack can be blocked obviously. If it misses, nothing happens but if it connects the character throws the opponent.

The throw itself is written as:

;Alley-oop
[Statedef 800]
type = S
physics = S
movetype = A
anim = 800
velset = 0,0
ctrl = 0

[State 800, Grab]
type = Hitdef
trigger1 = time = 0
attr = S, NT
hitflag = M-
guardflag =
sparkno = -1
priority = 2,Miss
p1stateno = 801
p2stateno = 802
p2facing = 1
guard.dist = -1
fall = 1
fall.recover = 0
givepower = 113

[State 800, End]
type = Changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

[Statedef 801]
type = S
physics = N
movetype = A
anim = 801
velset = 0,0

[State 801, Width]
type = Width
trigger1 = time = 0
edge = 60,60

[State 801, BindTarget]
type = TargetBind
trigger1 = AnimElemTime(1) = 0
pos = 55,0

[State 801, BindTarget]
type = TargetBind
trigger1 = AnimElemTime(2) = 0
pos = 43,-67

[State 801, BindTarget]
type = TargetBind
trigger1 = AnimElemTime(3) = 0
pos = 24,-83

[State 801, BindTarget]
type = TargetBind
trigger1 = AnimElemTime(4) = 0
pos = -4,-85

[State 801, Life]
type = TargetLifeAdd
trigger1 = AnimElemTime(4) = 0
value = ifelse(var(33)=1,2,1) * -113

[State 801, TargetState]
type = TargetState
trigger1 = AnimElemTime(4) = 0
value = 803

[State 801, Turn]
type = Turn
trigger1 = AnimTime = 0

[State 801, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[Statedef 802]
type = S
physics = N
movetype = H
velset = 0,0
ctrl = 0

[State 802, Anim]
type = ChangeAnim2
trigger1 = time = 0
value = 802

[Statedef 803]
type = A
physics = A
movetype = H
velset = 5,-8

[State 803, Fall]
type = selfstate
trigger1 = Pos Y >= -30
value = 5050


The charge move is written as:

 ;Spike Charge
[Statedef 3000]
type = S
movetype = A
physics = N
velset = 6,0
anim = 3000
ctrl = 0

[State 3000, NotHitBy]
type = NotHitBy
trigger1 = !movecontact
persistent = 1
value = , AP

[State 3000, HitBy]
type = HitBy
trigger1 = anim = 3000
persistent = 1
value = A, HA

[State 3000, Stopping]
type = ChangeAnim
trigger1 = Time >= 36
trigger1 = anim = 3000
value = 3001

[State 3000, Run]
type = PlaySND
trigger1 = timemod = 12,0
value = 3000,5
freqmul = 1.0

[State 3000, Grab]
type = HitDef
trigger1 = time = 0
attr = S, NA
hitflag = MAF-
guardflag = M
priority = 7, Hit
pausetime = 0, 0
guard.pausetime = 0, 15
sparkno = -1
guard.sparkno = -1
guard.dist = 60
getpower = 50, 0
givepower = 50, 0
p2facing = 1
p1stateno = 801
p2stateno = 802

[State 3000, End]
type = ChangeState
trigger1 = animtime = 0
trigger1 = anim = 3001
value = 0
ctrl = 1



Obviously I'm using a different character and it will have different animations but the idea will be the same. The throw I plan to use is written as:

[Statedef 770]
type = S
movetype = A
physics = N
juggle = 0
poweradd = 30
ctrl = 0
velset = 0,0
anim = 770
sprpriority = 1

[State 770, 0]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NT
damage = 7
hitflag = M
pausetime = 0,0
sparkno = -1
p1sprpriority = 0
hitsound = 1,1
guardsound =1,1
ground.type = High
p1stateno = 775
p2stateno = 780


[State 770, 1]
type = ChangeState
trigger1 = AnimTime = 0
Value = 0
ctrl = 1
;------------------
[Statedef 775]
type = S
movetype= A
physics = S
anim = 775
poweradd = 6

[State 775, 0]
type = HitDef
trigger1 = time = 0
attr = S, NT
damage = 6
hitflag = M
pausetime = 0,0
sparkno = -1
p1sprpriority = 1
hitsound = 1,1
ground.type = High

[State 775, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 89.5, -8

[State 775, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 32, 41.5

[State 775, Bind 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = 45, -57

[State 775, Bind 4]
type = TargetBind
trigger1 = AnimElem = 4
pos = -52.5, -140

[State 775, Turn]
type = turn
trigger1 = AnimTime = 5

[State 775, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 4
value = -78

[State 775, Throw]
type = TargetState
trigger1 = AnimElem = 4
value = 781

[State 775, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------
[Statedef 780]
type = S
physics = N
movetype = H
velset = 0,0
ctrl = 0

[State 780, Anim]
type = ChangeAnim2
trigger1 = time = 0
value = 780

[Statedef 781]
type = A
physics = A
movetype = H
velset = 5,-8

[State 781, Fall]
type = selfstate
trigger1 = time = 0
value = 5050
ctrl= 1

So what would changes would I need to make to have my character use this?
Re: adding from another character
#2  December 23, 2019, 01:14:46 pm
  • *****
  • Shame on you!
    • USA
Have you added the command you want to use to the cmd? And you'll have to add a changestate to switch to 3000 to get it moving.

If 770 is the throw you want you need to change

p1stateno = 801
p2stateno = 802

To the values you need. 775 & 780?
vVv Ryuko718 Updated 10/31/22 vVv