YesNoOk
avatar

How to drag the enemy next to the character? (Read 405 times)

Started by Toshio Tenma, August 01, 2011, 12:59:00 am
Share this topic:
How to drag the enemy next to the character?
#1  August 01, 2011, 12:59:00 am
  • ****
  • Maker of obscurity.
    • http://tetsuwanatom.b1.jcink.com/
My character Doremi have a super which force the enemy to be dragged next to her before she does a new hair cut on the victim. Which values I can use to make it happen? The enemy will be dragged next to her regardless of the distance.
That's how the super works:
http://www.youtube.com/watch?v=klivJzxu1hE
I'm thinking about making the p2 become a mouse for just two frames by using a explod or helper, but I'm clueless about how.
-Toshio Tenma
Last Edit: August 03, 2011, 02:58:19 pm by Toshio
Re: How to drag the enemy next to the character?
#2  August 01, 2011, 08:35:37 am
  • *****
  • Christmas? /人◕ ‿‿ ◕人\
    • UK
If P1 is put into a new state after the hit you can use targetstate to change the opponents state once they are in range

Example

[State 3000, target state]
type = TargetState
triggerall = numenemy
triggerall = numtarget(3000) = 1
trigger1 = P2bodydist X < 50 ;OR trigger1 = target,p2dist < 50; (for simul I guess)
value = 3015
id = 3000

State 3015 would be the state where p2 has stopped and is waiting to get hit.
Is a mess. :gonk: Needs sexy new coding to go with sexy sprites.
Re: How to drag the enemy next to the character?
#3  August 01, 2011, 10:17:17 am
  • ****
  • Maker of obscurity.
    • http://tetsuwanatom.b1.jcink.com/
I need a better example, because you forgot to add the "Movehit" which lead to the target state. I need to know a vel to force p2 to be dragged away and a vel to make p2 stop when next to p1.
-Toshio Tenma
Re: How to drag the enemy next to the character?
#4  August 01, 2011, 10:33:44 pm
  • *****
  • Christmas? /人◕ ‿‿ ◕人\
    • UK
You just need a hitdef with [mcode]p2stateno[/mcode]

You can use a normal velset in a custom hitstate
Is a mess. :gonk: Needs sexy new coding to go with sexy sprites.
Re: How to drag the enemy next to the character?
#5  August 02, 2011, 11:29:56 am
  • ****
  • Maker of obscurity.
    • http://tetsuwanatom.b1.jcink.com/
You just need a hitdef with [mcode]p2stateno[/mcode]

You can use a normal velset in a custom hitstate
I think I'm almost there, I just need help about what to do with characters non compatible. I wished them to become in a mice at least. I'll send the character, so you may able to suggest something^^
Post your thoughts here after taking a look, ok?
-Toshio Tenma
Re: How to drag the enemy next to the character?
#6  August 02, 2011, 08:07:52 pm
  • ****
  • Maker of obscurity.
    • http://tetsuwanatom.b1.jcink.com/
Quote
[Statedef 2000]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
poweradd = 5
sprpriority = 0
anim=2000

[State ScreenBound]
type = SuperPause
trigger1 = !Time
pos = 0,0
anim=s8065999
darken = 0
sound = s1600,1
poweradd = -1000
time = 32
movetime=32
supermove = 1

[State 2600, Super B]
type = Explod
trigger1 = !Time
pos = 260,510
postype = left
facing = 1
anim = 10030
sprpriority = -1
supermovetime = 30
removetime = 90
bindtime=-1
ownpal = 1
supermove = 1

[State 2600, FX]
type = Helper
trigger1 = time=1 ;<-ponha 2 se preferir
helpertype = normal
name = "palfx"
ID = 3215
stateno = 3215
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1 ; <-IMPORTANTE!
supermovetime = 99999
pausemovetime = 99999

[State 3000, BG FX]
type = Helper
trigger1 = time = 1
helpertype = normal
name = "palfx2"
ID = 3599
stateno = 3599
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 99999
pausemovetime = 99999

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=7
value = S1000,0
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 2500,change state]
type=ChangeState
triggerall=anim=2000
trigger1=enemy,stateno=2004
value=2002

[State 2000, Helper]
type = Helper
trigger1 = animelem=7
triggerall=anim=2000
ID = 2001
pos = 0,0
postype = p1
stateno = 2001
helpertype = normal
name = "Magic"
keyctrl = 0
ownpal = 1
supermovetime = 1

[State 2000, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Odango ~ projectile
[Statedef 2001]
type    = S
movetype= A
physics = N
juggle  = 1
ctrl = 0
poweradd = 5
sprpriority = 0

[State 0, RED]
type = VarSet
trigger1 = 1
triggerall=anim=2001
var(1) = 128 + ceil(128*cos(time/15.0))

[State 0, GREEN]
type = VarSet
trigger1 = 1
triggerall=anim=2001
var(2) = 128 + ceil(128*cos((time+30)/15.0))

[State 0, BLUE]
type = VarSet
trigger1 = 1
triggerall=anim=2001
var(3) = 128 + ceil(128*cos((time+60)/15.0))

[State 3209, PalFX]
type = PalFX
trigger1 = time <= 14
triggerall=anim=2001
time = 2
add = 84,0,168

[State 3209, PalFX]
type = PalFX
trigger1 = time = [15,74]
triggerall=anim=2001
time = 2
add = var(1),var(2),var(3)

[State 3209, PalFX]
type = PalFX
trigger1 = time >= 75
triggerall=anim=2001
time = 2
add = 224,0,0

[State 2001,vel x]
type=VelSet
trigger1=!time
x=12

[State 2001,0]
type=ChangeAnim
trigger1=anim!=2001
value=2001

[State 2001, No FG]
type = Assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2001,0]
type=NotHitBy
trigger1=1
value=,AA,AT

[State 2001, Explod]
type = Explod
trigger1 =  Gametime%2 = 0
anim = 8800
ID = 8800
pos = 84,-80
postype = p1
facing = 1
vfacing = 1
trans = addalpha
alpha = 240,256
vel = 0,1
accel = 0,.025
random = 48,96
removetime = -2
sprpriority = 7
shadow = 0,0,0
ownpal = 0
ignorehitpause = 1
removeongethit = 0

[State 2001, Explod]
type = Explod
trigger1 =  Timemod = 5, 0
anim = 8801
ID = 8801
pos = 84,-128
postype = p1
facing = 1
vfacing = 1
trans = addalpha
alpha = 240,256
vel = 0,1
accel = 0,.025
random = 48,24
removetime = -2
sprpriority = 7
shadow = 0,0,0
ownpal = 0
ignorehitpause = 1
removeongethit = 0

[State 2001, Explod]
type = Explod
trigger1 =  Gametime%2 = 0
anim = 8802
ID = 8802
pos = 84,-80
postype = p1
facing = 1
vfacing = 1
trans = addalpha
alpha = 240,256
vel = 0,1
accel = 0,.025
random = 48,96
removetime = -2
sprpriority = 7
shadow = 0,0,0
ownpal = 0
ignorehitpause = 1
removeongethit = 0

[State 2001, Explod]
type = Explod
trigger1 =  Timemod = 5, 0
anim = 8803
ID = 8803
pos = 84,-128
postype = p1
facing = 1
vfacing = 1
trans = addalpha
alpha = 240,256
vel = 0,1
accel = 0,.025
random = 48,24
removetime = -2
sprpriority = 7
shadow = 0,0,0
ownpal = 0
ignorehitpause = 1
removeongethit = 0

[State 2001, Explod]
type = Explod
trigger1 =  Timemod = 5, 0
anim = 8804
ID = 8804
pos = 84,-128
postype = p1
facing = 1
vfacing = 1
trans = addalpha
alpha = 240,256
vel = 0,1
accel = 0,.025
random = 48,24
removetime = -2
sprpriority = 7
shadow = 0,0,0
ownpal = 0
ignorehitpause = 1
removeongethit = 0

[State 2001,4]
type=HitDef
trigger1=animelem=1
attr=S,HP
damage=20,5
hitflag=MAF
guardflag=MA
getpower=70,40
givepower=15,15
sparkno=s8011
guard.sparkno=s8041
hitsound=S2000,0
guardsound=S120,2
animtype=medium
priority=5,Hit
pausetime=5,5
ground.hittime=24
air.hittime=25
sparkxy=70,-180
guard.slidetime=12
guard.velocity=-6
ground.slidetime=18
ground.type=High
ground.velocity=-6
airguard.velocity=-4,-6
air.velocity=-5,-6
air.fall=1
kill=0

[State 710, 1]
type       = TargetState
trigger1    = movehit
trigger1    = p2statetype = S || p2statetype = C
trigger1    = p2stateno != 2002
value       = 2003
persistent    = 0
ignorehitpause    = 1

[State 910,5]
type=HitOverride
trigger1=1
attr=SCA,AP
time=1
stateno=2001
ignorehitpause=1

[State 1003,stars]
type=Helper
trigger1=movehit
name="stars"
ID=1004
stateno=1004
postype=P1
pos=70,35
vel=0,0

[State 2001,stars]
type=Helper
trigger1=moveguarded
name="stars"
ID=1004
stateno=1004
postype=P1
pos=70,0
vel=0,0

[State 2001, end]
type=destroyself
trigger1=movehit

[State 2001, end]
type=destroyself
trigger1=moveguarded

[State 2001, end]
type=destroyself
trigger1=frontedgedist<-60
trigger2=backedgedist<-60
trigger3=time>40

;Odango Attack
[Statedef 2002]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
poweradd = 5
sprpriority = 0
anim=2002

[State 2001,4]
type=HitDef
trigger1=!time
attr=S,HP
damage=20,5
hitflag=MAF
guardflag=MA
getpower=70,40
givepower=15,15
sparkno=s8011
guard.sparkno=s8041
hitsound=S220,0
guardsound=S120,2
animtype=medium
priority=5,Hit
pausetime=5,5
ground.hittime=24
air.hittime=25
sparkxy=-30,-180
guard.slidetime=12
guard.velocity=-6
ground.slidetime=18
ground.type=High
ground.velocity=-6
airguard.velocity=-4,-6
air.velocity=-5,-6
air.fall=1
p2stateno=2005

[State 0, Helper]
type = Helper
trigger1 = movehit
trigger1 = numhelper(2006)=0
helpertype = normal ;player
name = "allpalfx"
ID = 2006
stateno = 2006
numhelper
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 2002, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Odango - Enemy Affected
[Statedef 2003]
type    = S
movetype= H
physics = N
poweradd= 0
juggle  = 1
ctrl = 0
velset = 0,0
sprpriority = 0

[State 719,0]
type       = ChangeAnim2
trigger1    = SelfAnimExist(62580) = 0
trigger1    = !Time
value       = 2003

[State 719,1]
type       = ChangeAnim2
trigger1    = SelfAnimExist(62580) = 1
trigger1    = !Time
value       = 62580

[State 2006, 2]
type = PlayerPush
trigger1 = time >= 0
value = 0

[State 2006, 3]
type = PosAdd
trigger1 = timemod = 10,0
trigger1 = time = [0, 50]
X = 100

[State 1302, SelfState]
type = ChangeState
trigger1 = P2dist X = [-65, 65]
value = 2004

[State 300, 1]
type = AfterImage
trigger1 = !time
time = 15
length = 10
framegap = 3
palcontrast = 160,160,160
paladd = 0,0,0
palmul = 1,1,1

[State 1302, SelfState]
type = SelfState
trigger1 = time>100
value = 0

;Odango - Enemy Affected
[Statedef 2004]
type    = S
movetype= I
physics = N
poweradd= 0
juggle  = 1
ctrl = 0
velset = 0,0
sprpriority = 0

[State 719,0]
type       = ChangeAnim2
trigger1    = SelfAnimExist(62572) = 0
trigger1    = !Time
value       = 2004

[State 719,1]
type       = ChangeAnim2
trigger1    = SelfAnimExist(62572) = 1
trigger1    = !Time
value       = 62581

[State 2006, 2]
type = PlayerPush
trigger1 = time >= 0
value = 0

[State 1302, SelfState]
type = SelfState
trigger1 = time>50
value = 0

;Odango - Enemy Affected
[Statedef 2005]
type    = S
movetype= I
physics = N
poweradd= 0
juggle  = 1
ctrl = 0
velset = 0,0
sprpriority = 0

[State 719,0]
type       = ChangeAnim2
trigger1    = SelfAnimExist(62572) = 0
trigger1    = !Time
value       = 2005

[State 719,1]
type       = ChangeAnim2
trigger1    = SelfAnimExist(62572) = 1
trigger1    = !Time
value       = 62582

[State 2006, 2]
type = PlayerPush
trigger1 = time >= 0
value = 0

[State 1302, SelfState]
type = SelfState
trigger1 = time>200
value = 5100
ctrl=1

;All Pal fix
[Statedef 2006]
type = S
movetype = I
physics = N
anim = 8055200
velset = 0,0
sprpriority = 2
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S2002,0
volume = 0
channel = -1
;lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
;abspan =
;ignorehitpause =
;persistent =

[State 2510,0]
type=AssertSpecial
trigger1=1
flag=invisible
ignorehitpause=1

[State 2510,1]
type=AllPalFX
trigger1=time=[0,16]
time=1
add=256,256,256
mul=128-(time*8),128-(time*8),128-(time*8)

[State 2510,2]
type=AllPalFX
trigger1=time=[17,32]
time=1
add=256,256,256
mul=0,0,0

[State 2510,3]
type=AllPalFX
trigger1=time=[33,64]
time=1
add=256,256,256
mul=((time-33)*8),((time-33)*8),((time-33)*8)

[State 2510,4]
type=AllPalFX
trigger1=time>64
time=1
add=256,256,256
mul=256,256,256

[State 2510,5]
type=DestroySelf
trigger1=time>50
That's the code so far, what I need to know is what is the correct palfix to make the screen black before the enemy get the odango or not (non compatible characters). I'm having issues with the p2 position as well.
-Toshio Tenma
Re: How to drag the enemy next to the character?
#7  August 02, 2011, 09:32:50 pm
  • *****
  • Christmas? /人◕ ‿‿ ◕人\
    • UK
If you want the screen to be all black use:

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [*insert 1st value here*,*insert second value here*]
flag = noBG
flag2 = noFG
Is a mess. :gonk: Needs sexy new coding to go with sexy sprites.
Re: How to drag the enemy next to the character?
#8  August 03, 2011, 02:33:06 pm
  • ****
  • Maker of obscurity.
    • http://tetsuwanatom.b1.jcink.com/
If you want the screen to be all black use:

[State 2010, AssertSpecial]
type = AssertSpecial
trigger1 = time = [*insert 1st value here*,*insert second value here*]
flag = noBG
flag2 = noFG
Look like you don't understood my question and apparently don't tested the super and neither saw the video. That information is not enough, I'm having issues with the helper which turns the screen all black, it loops for no apparent reason and the objective is having a explod when the screen goes black.
-Toshio Tenma
Re: How to drag the enemy next to the character?
#9  August 03, 2011, 02:53:51 pm
  • *****
  • Christmas? /人◕ ‿‿ ◕人\
    • UK
Can I see some screens from your conversion to go with your description, cause it's clear we're not singing from the same sheet.  :sweatdrop:
Is a mess. :gonk: Needs sexy new coding to go with sexy sprites.
Re: How to drag the enemy next to the character?
#10  August 03, 2011, 02:59:35 pm
  • ****
  • Maker of obscurity.
    • http://tetsuwanatom.b1.jcink.com/
I have sent the character by PM, don't you downloaded?
Odango works with ~D,DF,F,D,DF,F,a
-Toshio Tenma
Re: How to drag the enemy next to the character?
#11  August 03, 2011, 03:12:03 pm
  • *****
  • Christmas? /人◕ ‿‿ ◕人\
    • UK
So do you want the screen to go black and stay black until the explod appears?
Is a mess. :gonk: Needs sexy new coding to go with sexy sprites.
Re: How to drag the enemy next to the character?
#12  August 03, 2011, 03:15:54 pm
  • ****
  • Maker of obscurity.
    • http://tetsuwanatom.b1.jcink.com/
So do you want the screen to go black and stay black until the explod appears?
Did you saw the video? The screen go black when Doremi is hitting the enemy to apply the effect and then go back to normal when the effect is over, but when the screen go black, some explods appears.
-Toshio Tenma
Re: How to drag the enemy next to the character?
#13  August 03, 2011, 03:35:51 pm
  • *****
  • Christmas? /人◕ ‿‿ ◕人\
    • UK
From the looks of the vid, the screen doesn't fade to black like it does in your conversion. An asserstspecial like I recommended should work.

For the explod, it needs "ontop = 1" and Doremi and the opponent could use some invisible anims during the blackout.
Is a mess. :gonk: Needs sexy new coding to go with sexy sprites.