Nep Heart Posted March 4, 2019 Posted March 4, 2019 This is something I've done while revising projectile reflectors in all my characters ever since Haruhi's release since I wasn't satisfied with what they worked previously. I'm frankly proud of this even if it's not perfect and is definitely a step above the generic variety. So, I feel like sharing it with people... credit would be nice for recognition for those who wish to use it. Quote ; Reflector Helper [Statedef 1250] type = S movetype = A physics = N ctrl = 0 velset = 0,0anim = 1250 <--- the animation can be visible (to represent the reflector FX) or invisible (if the FX is part of the character animation already), but it must have both a blue and red CLSN overlapping each other [State 1250, No Shadow] type = AssertSpecial trigger1 = 1 flag = noshadow [State 1250, Rootbinder] type = bindtoroot trigger1 = 1 pos = 0,0 [State 1250, Invuln] type = nothitby trigger1 = 1 value = SCA time = -1 [State 1250, Vuln] type = hitby trigger1 = 1 value = SCA,NP,SP,HP time = -1 [State 1250, Reversaldef]type = reversaldeftrigger1 = 1reversal.attr = SCA,NP,SP,HPpausetime = 0,0sparkno = -1sparkxy = 0,0p2stateno = 1251numhits = 0ignorehitpause = 1 <--- this takes care of helper based projectiles and sends them to custom state[State 1250, Hitoverride]type = hitoverridetrigger1 = 1attr = SCA,NP,SP,HPstateno = 1252ignorehitpause = 1 <--- this takes care of projectile SCTRLs since reversaldefs do not work on them [State 1250, End]type = destroyselftrigger1 = root,movetype = H <--- have it go away if your character gets hit so the reflector doesn't continue lingering even after they've been hit out of the attacktrigger2 = time = 42 <--- how long you want the reflector to last ;--------------------------------------------------------------------------- ; Reflected Helper [Statedef 1251] type = A ctrl = 0 movetype = A physics = N sprpriority = 2 [State 1251, Hitoverride] type = HitOverride trigger1 = 1 attr = SCA,AA,AP,AT time = 1 stateno = 1251 ignorehitpause = 1 [State 1251, AssertSpecial] type = AssertSpecial trigger1 = 1 flag = noshadow [State 1251, Invuln] type = nothitby trigger1 = 1 value = SCA time = -1 [State 1251, StopSnd]type = StopSndtrigger1 = time = 180channel = -1ignorehitpause = 1persistent = 0 <--- this is a just in case measure if the helper projectile's sound plays infinitely [State 1251, Changeanime]type = ChangeAnimtrigger1 = !timevalue = anim <--- mimics the helper projectiles animation [State 1251, Turn]type = Turntriggerall = numenemy > 0trigger1 = facing =1 && enemy,facing !=1trigger2 = facing != 1 && enemy,facing =1 <--- turns the reflected helper projectile around so that it looks like it was properly reflected [State 1251, Velset]type = VelSettriggerall = vel xtrigger1 = !timetrigger2 = pos y>=0x = (ifelse(vel x>0,vel x,vel x*-1))y = (vel y-((vel y>0)*(vel y*2))) <--- sends the reflected helper back with its original velocity values [State 1251, Velset]type = VelSettriggerall = vel x = 0trigger1 = !timex = 10 <--- a just in case measure if the projectile happens to not use velsets/veladds for velocity [State 1251, Projectile] type = hitdef trigger1 = time = 1 persistent = 0 attr = A,SP animtype = Hard damage = ceil(60),30 hitflag = MAFDP guardflag = MA pausetime = 0,10 getpower = 100,100 givepower = 20,20 sparkxy = -5,0 hitsound = F5,4 guardsound = F6,0 ground.type = Low ground.slidetime = 16 ground.hittime = 16 ground.velocity = -8.2,0 air.velocity = -8.2,-7affectteam = F <--- Important if you want the reflected projectile to hit the opponent air.fall = 1 fall.recover = 0 hitonce = 1 yaccel = 0.4 [State 1251, Remove FX]type = removeexplodtrigger1 = IsHelpertrigger1 = time = 1ignorehitpause = 1 <--- removes any explods the projectile may have just in case they have infinite removetime [State 1252, End]type = SelfStatetrigger1 = !IsHelpervalue = 0ctrl = 1 <--- a just in case measure in the event you accidentally send the opponent into the reflector custom state [State 1251, End] type = DestroySelf trigger1 = time > 240 trigger2 = frontedgedist <-100 trigger3 = backedgedist <-100 trigger4 = movecontact ignorehitpause=1 ;--------------------------------------------------------------------------- ;[everything below here handles projectile SCTRLs stated from the hitoverride earlier] ; Reflected Projectile [Statedef 1252] physics = N movetype = I anim = 1 ctrl = 0 [State 1252, PSND] type = PlaySnd trigger1 = time = 0 value = 1,14 ignorehitpause = 1 persistent = 0 [State 1252, Hitoverride] type = HitOverride trigger1 = 1 attr = SCA,AA,AP,AT time = 1 stateno = 1252 ignorehitpause = 1 [State 1252, AssertSpecial] type = AssertSpecial trigger1 = 1 flag = noshadow [State 1252, Projectile] type = projectile trigger1 = time = 1 persistent = 0 projID = 1252 projanim = 1020 projhitanim = 1025 offset = 75,0 projpriority = 7 projremovetime = -1 attr = A,SP animtype = Hard damage = ifelse(numhelper(3100) <= 0,ceil(ifelse(var(56)=0,60,120)),ceil(ifelse(var(56)=0,75,150))),75 hitflag = MAF guardflag = MAF pausetime = 0,10 getpower = ifelse(numhelper(3100) <= 0,ceil(100),ceil(50)),ifelse(numhelper(3100) <= 0,ceil(100),ceil(50)) givepower = 50,50 velocity = 9,0 sparkno = -1 guard.sparkno = -1 sparkxy = 0,-70 hitsound = s1,14 guardsound = s2,1 ground.type = Low ground.slidetime = 16 ground.hittime = 16 ground.velocity = -8.2 air.velocity = -3.4,-1.0 air.fall = 1 fall.recover = 0 yaccel = 0.35 [State 1252, Remove FX] type = removeexplod trigger1 = IsHelper trigger1 = time = 1 ignorehitpause = 1 [State 1252, End] type = DestroySelf trigger1 = IsHelper trigger1 = time = 1 ignorehitpause = 1 Expand All this is for the entire projectile reflector helper itself. Quote [State -2, Guard Dist] type = projectile trigger1 = numhelper(1250) = 1 trigger1 = !numprojID(1250) projID = 1250 projanim = 1 velocity = 0,0 guard.dist = 300 postype = p2 offset = 0,5000 projremovetime = 240 ignorehitpause = 1 Expand In statedef -2, you will be required to have an invisible projectile with no CLSNs summoned whenever the reflector is out so that the reflected helper projectile doesn't become unblockable as a result of the reflected projectile still technically being owned by the opponent, which would make it unblockable without this measure. Note: The main flaw for this reflector is that the reflected projectile will become invisible if the helper projectile in question uses an explod as an FX instead of its own animation, but that's not too common otherwise. Veronica Shangdi 上帝真絵 1
Veronica Shangdi 上帝真絵 Posted March 5, 2019 Posted March 5, 2019 Looks like useful for me. Nothing to insert here, just it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now