Binding enemy to helper

Started by sgn15, April 28, 2012, 12:26:54 PM

Previous topic - Next topic

sgn15

Spoiler (click to show)

;---------------------------------------------------------------------------
[Statedef 2213]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim = 2213

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1

[State 0, TargetBind]
type = TargetBind
trigger1 = Time = [0,20]
time = 1
;id = -1
pos = 0,0

[State 0, TargetBind]
type = TargetBind
trigger1 = Time >= 21
time = 1
;id = -1
pos = -1,-522

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = -5
;ignorehitpause =
;persistent =

[State 0, EnvShake]
type = EnvShake
trigger1 = Time = 100
time = 30
freq = 60
ampl = -30
phase = 90
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1 = Time = 100
anim = 2215
ID = 2215
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermovetime = 999999999999999999
pausemovetime = 999999999999999999
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 0
;ignorehitpause =
;persistent =

[State 0, Velset]
type = velset
trigger1 = Time >= 21
trigger1 = pos x != 0 && facing = 1
x = ifelse((pos x > 0), -2, 2)

[State 0, Velset]
type = velset
trigger1 = Time >= 21
trigger1 = pos x != 0 && facing = -1
x = ifelse((pos x > 0), 2, -2)

[State 0, velset]
type = velset
trigger1 = Time >= 21
trigger1 = pos y != -180
y = -5

[State 0, VelSet]
type = VelSet
trigger1 = Time >= 21
trigger1 = pos Y <= -180
x = 0
y = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 100

when my helper goes to the sky level (pos 0,-180), p2 is not binded to the helper anymore. both targetbinds don't work

p2 is in custom state btw

edit:
helper's first state is 2212, then it changes to state 2213 when movehit = 1 so helper did hit the enemy but the 2 targetbind sctrl does not work

Cyanide

Helpers can leave the screen by default players can't. You need to disable screenbound to let p2 off screen. Thats in the custom state you're using.


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.

sgn15

#2
Spoiler (click to show)

;---------------------------------------------------------------------------
[Statedef 2212]
type    = S
movetype= A
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim = 2212

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = unguardable

[State 0, VelSet]
type = VelSet
trigger1 = pos y < -30
x = 5
y = 5

[State 0, VelAdd]
type = VelAdd
trigger1 = pos y < -30
x = 2
y = 2

[State 0, VelSet]
type = VelSet
trigger1 = pos y >= -30
x = 5
y = 0

[State 0, 3]
type = HitDef
trigger1 = 1
attr = S, NA
animtype  = Light
damage    = 0
guardflag = NA
priority = 2, Hit
pausetime = 0,0
sparkno = -1
sparkxy = -10,65
hitsound   = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 11
ground.velocity = 0,-1
air.velocity = 0,-1
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
p2stateno = 2214

[State 0, TargetBind]
type = TargetBind
trigger1 = movehit = 1
time = -1
pos = 0,0

[State 0, 5]
type = ChangeState
trigger1 = movehit
value = 2213

[State 0, DestroySelf]
type = DestroySelf
trigger1 = screenpos X != [0,320]

the helper is actually originally/initially called at state 2211 (just for aesthetics in that state), that changes to state 2212 when animtime = 0

I think the problem might be that the helper hits p2 in state 2212 but I want to bind the enemy to the helper while the helper is in state 2213. is it possible to bind the enemy in a state different from the one where you hit the enemy ?

state 2213 is still has the same codes as it was posted in the first post.

and the helper never goes out of screen because of its velset based on pos in state 2213 (i think), so the issue about going out of screen is not existing?

I added a screenbound like you said in custom state but it did not change anything.

edit: here is the custom state

Spoiler (click to show)

;---------------------------------------------------------------------------
; custom state
[Statedef 2214]
type    = S
movetype= I
physics = N
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
;ignorehitpause =
;persistent =

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
;ignorehitpause =
;persistent =

[State 0, LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = -50

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 1
;ignorehitpause =
;persistent =

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = [0,20]
value = 5000

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time = [0,20]
scale = (10-time)*0.05, (10-time)*0.05

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time = [0,20]
value = time*150

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time >= 21
flag = invisible

[State 0, VelSet]
type = VelSet
trigger1 = Time >= 90
x = -2
y = -10

[State 0, LifeAdd]
type = LifeAdd
trigger1 = Time = 100
value = -300

[State 0, EnvShake]
type = EnvShake
trigger1 = Time = 100
time = 20
freq = 60
ampl = -30
phase = 90

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 100
x = -150
y = 0
;ignorehitpause =
;persistent =

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time = 100
value = 0
scale = 1,1

[State 0, SelfState]
type = SelfState
trigger1 = time = 100
value = 5050
ctrl = 1

Cyanide

P2 is movetype I. You're not a target if you're idle. Make it H.


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.