The Mugen Multiverse
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Welcome!!! - Bienvenidos!!! - ( We hope you will get involved in the MMV Community which is dedicated to having fun with Mugen ) - Bienvenidos!!! - Welcome!!!
 
PortalHomeFAQMemberlistLatest imagesUsergroupsSearchRegisterComic WIP TrackerDownloadsLog inChat
Website Navigation Help
Translate the Website
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» we need deathlook
Reflect attack not reflecting Emptyby Cesar Today at 4:37 am

» --> [SPAM GAME] - Word Association Game <--
Reflect attack not reflecting Emptyby Shining Yesterday at 11:12 pm

» B-kun's 8-Bits Series Big Update!! (14 chars)
Reflect attack not reflecting Emptyby Doom Yesterday at 8:04 pm

» Skhsato123 Sprites
Reflect attack not reflecting Emptyby Doom Yesterday at 7:53 pm

Special Features at MMV




Chat on MMV w/ Discord

Video Content Creation Reference
Search
 
 

Display results as :
 
Rechercher Advanced Search

 

 Reflect attack not reflecting

Go down 
2 posters
AuthorMessage
Minun

Minun


Posts : 142
Join date : 2015-03-08

Reflect attack not reflecting Empty
PostSubject: Reflect attack not reflecting   Reflect attack not reflecting EmptyMay 12th 2015, 8:16 pm

Instead of deflecting projectiles, it disappears and the character itself gets hurt by it for some reason.

Basically, I want the character to deflect projectiles with this attack.

;---------------------------------------------------------------------------
; Neutral B Forward
; CNS difficulty: easy
[Statedef 1300]
type    = S ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A ;Move-type: A-attack, I-idle, H-gethit
physics = S ;Physics: S-stand, C-crouch, A-air
juggle  = 1 ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0 ;Set velocity (x,y) (Def: no change)
ctrl = 0 ;Set ctrl (Def: no change)
anim = 1300 ;Change animation (Def: no change)
poweradd = 20 ;Power to add (Def: 0)
sprpriority = 2 ;Set layering priority to 2 (in front)



[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal ;player
name = "Rejector"
ID = 1301
stateno = 1301
pos = 36,-40
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = 1.5
size.yscale = 1.5
;size.ground.back =
;size.ground.front =
;size.air.back =
;size.air.front =
;size.height =
;size.proj.doscale =
;size.head.pos = ,
;size.mid.pos = ,
;size.shadowoffset =
;ignorehitpause =
;persistent =





[State 0, CtrlSet]
type = CtrlSet
trigger1 = stateno = 40 && time = 15
value = 1
;ignorehitpause =
;persistent =


[State 201, 0]
type = ChangeState
trigger1 =  command != "hold_a"
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Neutral B Forward air
; CNS difficulty: easy
[Statedef 1301]
movetype= A ;Move-type: A-attack, I-idle, H-gethit
juggle  = 1 ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0 ;Set velocity (x,y) (Def: no change)
ctrl = 0 ;Set ctrl (Def: no change)
anim = 1301 ;Change animation (Def: no change)
poweradd = 20 ;Power to add (Def: 0)
sprpriority = 2 ;Set layering priority to 2 (in front)

[State Invisible Helper, Deflect]
type=reversaldef
trigger1=target,ishelper
reversal.attr=sca,ap
p2stateno= 1302


[State 0, DestroySelf]
type = DestroySelf
trigger1 =  root,stateno != 1300
;ignorehitpause =
;persistent =

;---------------------------------------------------------------------------
; Neutral B Forward
; CNS difficulty: easy
[Statedef 1302]
movetype= A ;Move-type: A-attack, I-idle, H-gethit

[State Deflect, Turn Projectile Around To Face Enemy]
type=turn
trigger1=ishelper&&time=0

[State Deflect, Mirror Speed]
type=velset
trigger1=ishelper
x=(-vel x)

[State Deflect, Hit]
type=hitdef
trigger1=ishelper
attr=s,sp
damage=(vel x*10),(vel x*2) ; needless to say, velocity will vary, so using velocity to damage accordingly is the best way to go imo, think of a real life situation, more speed, more impact
p1stateno= 1303


[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 30
;ignorehitpause =
;persistent =
[Statedef 1303]
movetype=i

[State Impact, Shrink Setting]
type=varset
trigger1=time=0
fvar(2)=0
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State Impact, Shrink Setting]
type=varadd
trigger1=time>=0
fvar(2)=-0.7
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State Impact, Shrink To Nothing]
type=angledraw
trigger1=time>=0
scale=const(size.xscale)+(fvar(2)), const(size.yscale)+(fvar(2))
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State Impact, Gone]
type=destroyself
trigger1=const(size.xscale)=0&&const(size.yscale)=0
Back to top Go down
Minun

Minun


Posts : 142
Join date : 2015-03-08

Reflect attack not reflecting Empty
PostSubject: Re: Reflect attack not reflecting   Reflect attack not reflecting EmptyMay 14th 2015, 5:03 pm

Someone? Please?
Back to top Go down
Minun

Minun


Posts : 142
Join date : 2015-03-08

Reflect attack not reflecting Empty
PostSubject: Re: Reflect attack not reflecting   Reflect attack not reflecting EmptyMay 16th 2015, 8:09 am

Ok...
Back to top Go down
Werewood

Werewood


Posts : 5691
Join date : 2014-08-11

Reflect attack not reflecting Empty
PostSubject: Re: Reflect attack not reflecting   Reflect attack not reflecting EmptyMay 16th 2015, 11:43 am

Hey I remember that was 2OS' MUGEN projectile reflector code!  He said that was not tested so I guess it needs some fixes and tweaks.  By the way, 2OS's MUGEN ideas and code are usually very innovative and inspiring! yes

Please note for now all MUGEN versions (winmugen, MUGEN1.0, MUGEN1.1) do not support projectile reflector officially!
Unless in the future Elecbyte will be adding some new functions like ProjReflected trigger or helpertype = projective for Helper state controller.........well, for now these are in every MUGEN fan's dream I guess....... Rolling Eyes

If I am not wrong, then there are two (2) types of projectiles in MUGEN for now:
- Helper-based Projectile, a simulating projectile used by a Helper state controller
- Projectile, the real projectile state controller

The un-tested MUGEN projectile reflector code by 2OS shall work, and it is for Helper-based Projectile only!
With some fixes and tweaks, it still has many limits and errors, like:
- since it makes use of the ReversalDef, which supports very limited set of HitDef values: pausetime, sparkno, hitsound, p1stateno, and p2stateno, and Elecbyte said, "The sparkxy parameter is treated as an offset to P2's hitdef's sparkxy", so you can really position the hit spark.  You can let sparkno be -1 and use Explod upon MoveHit to produce a custom hit spark (shall not be too hard do so I didn't do it in my demo below here).
- since it makes use of the ReversalDef, which is a very buggy state controller, some times it is not able to reverse a thing at all (you will see it in my demo below here).
- despite of its limits and errors, it is able to use enemies' Helper-based projectile animation and HitDef, this is the only part that makes it behave like the projectile reflector in real fighting games.

The other non-Helper-based projectile reflector, that can reflect both the Helper-based projectile and the real projectile, makes use of the HitOverride state controller, and it has been commonly used in MUGEN (KOF Kula, KOF Athena, my old TMNT Cyber Shredder,...etc.)
It has pro and con:
- pro:  you can have more control and it rarely produces bugs and errors
- con:  the reflected projectile is your projectile, not your enemies'........
Well, this method actually is a fake projectile reflector.......

Ok now my demo here:
- reflecting Helper-based Projectile (by 2OS with some fixes and tweaks):
Reflect attack not reflecting M6aj2AR
in case imgur not working for you....:
* as you see in this MUGEN GIF, the 1st time KFM failed to reflect CFJ Oni's Helper-based projectile, it is due to ReversalDef bug (someone can try to fix it?) or the Helper-based projectile setup......
* the reflecting hit spark was misplaced because ReversalDef doesn't support sparkxy with respect to KFM, please see above explanation for an Explod MoveHit hit spark method
* a more serious MUGEN bug:  the reflected Helper-based projectile belongs to CFJ Oni, however, he is not able to block/guard that even there is a guardflag = MA in the Helper's HitDef........ Reflect attack not reflecting 1340147569
* you can't really possible to use your own sparks and sounds for the reflected Helper-based projectile because it belongs to your enemies' and there is no way to insert sprites and sounds to your enemies' SFF and SND...... No

Now the much less buggy non-Helper-based projectile reflector that can reflect both the Helper-based projectile and the real projectile (my old Cyber Shredder HitOverride method):
Reflect attack not reflecting MOqCsPG
in case imgur not working for you....:
* the failed projectile reflecting 1st attempt was not a bug!  I deliberately delayed KFM's taunt to show he was getting hit.
* the 2nd projectile reflecting attempt succeeded as expected.  The flying KFM head (LOL) is the fake "reflected enemy's projectile)

So, a real buggy projectile reflector, and a fake yet rarely buggy projectile reflector, two-in-one for this KFM demo for you......

Download here:  https://www.sendspace.com/file/y42l2r
or
Download here:  http://www.mediafire.com/download/p694odqphqoahbt/kfm_projectile_reflector_demo_with_2OS_MUGEN_code.zip

2OS' MUGEN projectile reflector code is placed in KFM's taunt state:  StateDef 195
The "Rejector" Helper code is placed just below StateDef 195.
Please note that a "Stand get-hit (shaking)" StateDef 5000 common get-hit state, is needed to put under "; Override common states (use same number to override) :" (just right above [Statedef -2]), because it contains a DestroySelf state controller to prevent KFM's "Rejector" Helper from entering KFM's StateDef 5000 (a KFM clone) when being reversed/countered.  This is a 2OS' MUGEN tip too. Idea
Back to top Go down
https://onedrive.live.com/?cid=7DB65F02B0BBD12E
Sponsored content





Reflect attack not reflecting Empty
PostSubject: Re: Reflect attack not reflecting   Reflect attack not reflecting Empty

Back to top Go down
 
Reflect attack not reflecting
Back to top 
Page 1 of 1
 Similar topics
-
» Attack with claws or blade
» Srew attack
» X-Men #16 - Acolytes Attack!
» Robot Unicorn Attack
» attack randomly crashes the game

Permissions in this forum:You cannot reply to topics in this forum
The Mugen Multiverse :: Mugen Related :: Mugen Help-
Jump to: