アイドリングはします)
自分で間違っている箇所を探したのですが、どんなにさがしても見つけられません。
どこがおかしいのか教えてください。回答よろしくお願いします。
(punch1=1でパンチ、kick1=1でキック,act1waza=1で弱必殺技というふうに、変数に1が
代入されると攻撃するようになっています。)
長いスクリプトですみません
*MoveChara1 //二つのキャラクターの間の距離を取得する vecx = posx7 - posx5 vecy = posy7 - posy5 vecz = posz7 - posz5 E3DVec3Length vecx,vecy,vecz,kyori Pdamege1=70 Kdamege1=90 Adamege1=20 Hdamege1=500 ;hsid7のキャラクタの動作制御 k=0 forwardstep1 = 600.0 backstep1 = -600.0 if kyori <= 90.0 : back1=1 if newmk1=mk1_idling & kyori<=170.0 & newmk2=mk2_ua : konboflag=1 if newmk1=mk1_idling & kyori<=170.0 & konboflag = 1 { konbo=rnd (3) if konbo=0 : punch1=1 if konbo=1 : kick1=1:dialog "1515",1 if konbo=2 : gedan1=1 if newmk1!mk1_idling & confflag=0 : konboflag=0 } if newmk2=savemotion2 & newmk1=mk1_idling & kyori<=170.0 { gard=rnd (3) if gard=1{ if newmk2=mk2_punch : kick1=1:dialog "1525",1 if newmk2=mk2_kick : defense1=1 if newmk2=mk2_act1 : defense1=1 } } if kyori<=170.0 & newmk2!mk2_idling & newmk2!mk2_defense & newmk2!mk2_huse & newmk2!mk2_jump & newmk2!mk2_shunho & newmk2!mk2_back : defense=rnd (4) if newmk1=mk1_idling & kyori>170.0 { flont=rnd (5) if flont= (0|1|2|3) : a=1 if flont=4 : shun=1 } if newmk2!mk2_idling & newmk2!mk2_defense & newmk1=mk1_idling & kyori<=250.0 { mane=rnd (4) if mane=1 & newmk2=mk2_huse : huse1=1 if mane=1 & newmk2=mk2_back : back1=1 if mane=1 & newmk2=mk2_shunho : shunho1=1 } if newmk1=mk1_idling & kyori<=170.0 & newmk2=(mk2_punch | mk2_kick | mk2_act1 | mk2_gedan | mk2_hissatu | mk2_kidame | mk2_blast){ attack1=rnd (4) attack12=rnd (4) counter=rnd (3) gedanjunp=rnd (2) if attack1=0|1 : defense1=1 if attack1=2|3 : shunho1=1 if newmk2=mk2_gedan & gedanjunp=1 : junp1=1 if attack12=1 : huse1=1 if attack12=2 : shunho1=1 if attack12=3 : backshun=1 if counter = 1 : kick1=1 if counter = 2 : punch1=1 } if newmk1 = mk1_shunho & frameno7>=max1=shunho : shunhoat=1 if newmk1!mk1_shunho & shunhoat!0{ shunhoattack = rnd (3) if shunhoattack = 0 : punch1=1 if shunhoattack = 1 : kick1=1 if shunhoattack = 2 : gedan1=1 shunhoat+1 } if shunhoat<=6 : shunhoat=0 newmk2=savemotion2 if defense1=0 & frameno7>=max1_defense : newmk1=mk1_idling if sspoint1>=150{ hissatu=rnd (10) if hissatu=1 & sspoint1!300 : act1waza=1 if hissatu=1 & sspoint1=300 : hissatu1=1 } if newmk1=mk1_idling & kyori<=170.0 & konboflag!1{ elseattack=rnd (5) if elseattack=0 : punch1=1 if elseattack=1 : kick1=1 if elseattack=2 & sspoint1>=150 : act1waza=1 if elseattack=3 : gedan1=1 if elseattack=4 & sspoint1=300:hissatuwaza=1 if elseattack=5 & sspoint1<300 : kidame1=1 } if confflag!0 { if newmk2=mk2_punch : UA=1 if newmk2=mk2_kick : UA=1 if newmk2=mk2_act1 : UA=1 } if CHARA=2 & newmk2!mk2_act1 & bomconf=1 : UA=1 if newmk1=mk1_hissatu : punch1=0:kick1=0:defense1=0:gedan1=0:a=0:back1=0 attackflag = 0 E3DGetMotionKind hsid7, curmk1 newmk1 = curmk1 ;モーションのフレーム番号が、最大値に到達したら、モーションをidlingに戻す。 if (curmk1 = mk1_punch)&(frameno7 >= max1_punch) : newmk1 = mk1_idling if (curmk1 = mk1_idling)&(frameno7 >= max1_idling) & defense1=0: newmk1 = mk1_idling if (curmk1 = mk1_kick)&(frameno7 >= max1_kick) : newmk1 = mk1_idling if (curmk1 = mk1_defense)&(defense1=0)&(frameno7 >= max1_defense) : newmk1 = mk1_idling if (curmk1 = mk1_act1) & (confflag=0 | frameno7>=max1_act1 ) : newmk1 = mk1_idling if (curmk1 = mk1_ua)&(frameno7 >= max1_ua) : newmk1 = mk1_shunho if (curmk1 = mk1_kokeru)&(frameno7 >= max1_kokeru) : newmk1 = mk1_idling if (curmk1 = mk1_doun)&(frameno7 >= max1_doun): newmk1 = mk1_idling if (curmk1 = mk1_shunho)&(frameno7 >= max1_shunho): newmk1 = mk1_idling if (curmk1 = mk1_junp)&(frameno7 >= max1_junp): newmk1 = mk1_idling if (curmk1 = mk1_huse)&(frameno7 >= max1_huse): newmk1 = mk1_idling if (curmk1 = mk1_tame)&(frameno7 >= max1_tame): hissatuwaza=1 if (curmk1 = mk1_hissatu)&(frameno7 >= max1_hissatu):sspoint1=0: newmk1 = mk1_idling if (curmk1 = mk1_kidame)&(frameno7 >= max1_kidame)&kidame1=0: newmk1 = mk1_idling if (curmk1 = mk1_dash)&(a!1): newmk1 = mk1_idling if (curmk1 = mk1_dash)&(b!1): newmk1 = mk1_idling if (curmk1 = mk1_gedan)&(frameno7>=max1_gedan):newmk1=mk1_idling if (curmk1 = mk1_idling)&(frameno7>=max1_idling):newmk1=mk1_idling ;条件に応じて、新しいアクションをセットする。相手方向を向くようにする。 if punch1=1 & newmk1=mk1_idling : damege1=Pdamege1:Pdamege1=60:E3DDirToTheOtherXZ hsid7, hsid5:a=0:kick1=0:defense1=0:backshun=0:junp1=0:kidame1=0:back=0:shun1=0:gedan=0:huse=0 if kick1=1 & newmk1=mk1_idling : damege1=Kdamege1 : E3DDirToTheOtherXZ hsid7, hsid5:a=0:punch1=0:defense1=0:backshun=0:junp1=0:kidame1=0:back=0:shun1=0:gedan1=0:huse=0 if gedan1=1 & newnewmk1=mk1_idling : damege1=100 : E3DDirToTheOtherXZ hsid7, hsid5:a=0:punch1=0:defense1=0:backshun=0:junp1=0:kidame1=0:back=0:shun1=0:kick1=0:huse=0 if junp1=1 & newnewmk1=mk1_idling : newmk1=mk1_junp : junp1=0:a=0:punch1=0:kick1=0:defense1=0:backshun=0:kidame1=0:back=0:shun1=0:huse=0 if a=1 & newnewmk1=mk1_idling : newmk1=mk1_dash : junp1=0 : E3DDirToTheOtherXZ hsid7, hsid5:punch1=0:kick1=0:act1waza=0 if back=1 & newnewmk1=mk1_idling : newmk1=mk1_back:a=0:punch1=0:kick1=0:defense1=0:backshun=0:junp1=0:kidame1=0:shun1=0:gedan=0:huse=0 if (curmk1 = mk1_idling) & shun1=1 : newmk1 = mk1_shunho:a=0:punch1=0:kick1=0:defense1=0:backshun=0:junp1=0:kidame1=0:back=0 if defense1=1 & newnewmk1=mk1_idling : newmk1 = mk1_defense :a=0:punch1=0:kick1=0:backshun=0:junp1=0:kidame1=0:back=0:shun1=0 if UA=1 & newmk1!mk1_ua : newmk1 = mk1_ua : E3DDirToTheOtherXZ hsid7, hsid5:UA=0 if confflag!0 & (curmk2 = mk2_gedan) & newmk1!mk1_act1:newmk1=mk1_kokeru if huse=1 & newmk1=mk1_idling: newmk1=mk1_huse:a=0:punch1=0:kick1=0:defense1=0:backshun=0:junp1=0:kidame1=0:back=0:attackflag=0 if (curmk1 = mk1_idling) & hissatuwaza1=1 & kyori<200.0 & newmk1!mk1_ua:newmk1 = mk1_hissatu & newmk1!mk1_act1:E3DDirToTheOtherXZ hsid7, hsid5:hissatuwaza1=0:damege1=Hdamege1:a=0:punch1=0:kick1=0:defense1=0:backshun=0:junp1=0:kidame1=0:back=0:attackflag=0 if (curmk1 = mk1_idling) & act1waza=1 & newmk1!mk1_ua : newmk1 = mk1_act1 :damege1=Adamege1:E3DSetPos hsid7, posx5,posy5,posz5:a=0:punch1=0:kick1=0:defense1=0:backshun=0:junp1=0:kidame1=0:back=0:attackflag=0 if kidame1=1 & newmk1!mk1_ua & newmk1!mk1_act1 : newmk1=mk1_kidame:a=0:punch1=0:kick1=0:defense1=0:backshun=0:junp1=0:back=0:shun1=0:damege1=Adamege1 if hissatu1=1:newmk1 = mk1_tame & newmk1!mk1_ua:E3DDirToTheOtherXZ hsid7, hsid5 if newmk1=mk1_shunho & frameno7=0 : E3DDirToTheOtherXZ hsid7, hsid5 if newmk1!mk1_shunho : E3DDirToTheOtherXZ hsid7, hsid5 if newmk1 != curmk1 : E3DSetMotionKind hsid7, newmk1 ;応じて、移動、回転をする。 if a=1 : E3DPosForward hsid7, forwardstep1:punch1=0:kick1=0:defense1=0:backshun=0:junp1=0:kidame1=0:back=0:gedan=0:huse=0 if back=1 : E3DPosForward hsid7, backstep1:a=0:punch1=0:kick1=0:defense1=0:backshun=0:junp1=0:kidame1=0:shun1=0:gedan=0:huse=0 if (a=1) & newmk1=mk1_junp: E3DPosForward hsid7, forwardstep1+30 if (bak=1) & newmk1=mk1_junp: E3DPosForward hsid7, backstep1+30 if (a=1) & newmk1=mk1_huse: E3DPosForward hsid7, forwardstep1-30 if (bak=1) & newmk1=mk1_huse: E3DPosForward hsid7, backstep1-30 if newmk1=mk1_punch:E3DPosForward hsid7, 30.0 if newmk1=mk1_kick : E3DPosForward hsid7, 20.0 if newmk1=mk1_ua : E3DPosForward hsid7, -60.0 if (newmk1 = mk1_shunho)&(frameno7 >= max1_shunho):E3DPosForward hsid7, 5000.0 : if backshun=1 : E3DPosForward hsid7, -5000.0:a=0:punch1=0:kick1=0:backshun=0:junp1=0:kidame1=0:back=0:shun1=0 ;confflagが0で無い場合、2体が重なりすぎないように、離す。 if confflag!0 & (newmk2 = mk2_ua | newmk2 = mk2_defense): E3DSeparateFrom hsid7, hsid5,100.0 attackflag = 0 UA=0 COUN=0 junp1=0 a=0:punch1=0:kick1=0:defense1=0:backshun=0:junp1=0:kidame1=0:back=0:attackflag=0 if newmk1=mk1_hissatu :E3DSetPos hsid7, posx5,posy5,posz5 if newmk1!mk1_act1 : act1waza=0 : shun1=0 return