YesNoOk
avatar

Reflecting projectile help again (Read 907 times)

Started by krudelu, July 17, 2018, 01:39:47 pm
Share this topic:
Reflecting projectile help again
New #1  July 17, 2018, 01:39:47 pm
  • **
  • (>owo)><(owo<)
Just posting a new thread regarding this topic so I don't want to end up necroing the old thread I made from about 5-6 months ago. Also, I just came back from getting some time to do some character coding practice recently since spring is over now (spring got me busy on other stuff).

Original thread this is continued on: http://mugenguild.com/forum/topics/reflecting-projectile-help-now-posted-video-182576.0.html

Okay, now I tried checking the new updated kfm to try the reflector code again. I gave it a try and for some reason, the projectile gets destroyed right in front of the one that's firing it. And I did some tweaks and instead, the projectile ends up getting destroyed when making contact with the reflector.

Also, when it comes to var(1), I'm not sure what it's exactly used for since I give it a check and it's also being used in .cmd.

So, what exactly is changed for the reflector code to work this time like a ping pong? I'm not sure if I'm doing something wrong this time on my end.

And just in case, here are the codes when I put the header on the normal states and reflected state

Code:
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;飛び道具を跳ね返し行動設定                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / 飛び道具で              ;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1007 <----This is my reflected state
;=======================================;


And for the header of reflected state:
Code:
;=======================================;
;PROJECTILE REFLECTION COMPATIBILITY    ;
;飛び道具を跳ね返し行動設定                   ;
;by Vans                                ;
;GUIDE:                                 ;
;FOR PROJECTILE / 飛び道具で              ;
;sysvar(0) = 131072                     ;
;sysvar(1) = REFLECTED_BEHAVIOR_STATE   ;
;=======================================;
[State 1005, COMPATIBILITY]
type = VarSet
trigger1 = !time
sysvar(0) = 131072
[State 1005, REFLECTED STATE]
type = VarSet
trigger1 = !time
sysvar(1) = 1005 <--------------Normal State
;=======================================;

And I already added what's supposed to be added at hitdef in reflected state and the new changestate at the end and it still won't allow for the projectile to be reflected back after the projectile being reflected. Is there something else I may be doing wrong here?
Last Edit: July 18, 2018, 06:55:42 am by krudelu