YesNoOk
avatar

Helper style white flash screen upon move hit (Read 7428 times)

Started by Sheng Long, September 24, 2004, 04:59:43 am
Share this topic:
Helper style white flash screen upon move hit
#1  September 24, 2004, 04:59:43 am
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
I've made an easier way to come up with adding screen flash (when the player successfully hits opponent) into characters super moves using the helper object.

I'm not sure if anyone has tried this method. But I thought it might be helpful. ;)

This is how I start setting up the flash object during the player's super move state.
Code:
;---------------------------------------------------------------------------
; Player's Super Move
[Statedef 2000]

[State 2000, Helper]
type = Helper
trigger1 = Time <= 0
trigger1 = NumHelper(3000) = 0
helpertype = normal
ignorehitpause = 1
name = "Flash"
persistent = 0
id = 3000
facing = 1
pos = 0,0
postype = P1
stateno = 3000
keyctrl = 0
ownpal = 1

[Everything else down here]

;---------------------------------------------------------------------------

This is where I set up the helper object's flash effect states.
Code:
;---------------------------------------------------------------------------
; Super Move Object
[Statedef 3000]
velset = 0,0
ctrl = 0

[State 3000, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 3000, Special]
type = AssertSpecial
trigger1 = 1
flag = Invisible

[State 3000, BindToRoot]
type = BindToRoot
trigger1 = 1
facing = 1
pos = 0,0
time = 1

[State 3000, State]
type = ChangeState
trigger1 = Parent, MoveHit
trigger1 = Parent, HitPauseTime > 0
value = 3001

[State 3000, Destroy]
type = DestroySelf
trigger1 = Root, MoveType != A

;---------------------------------------------------------------------------
; Super Move Object - Hit Flash
[Statedef 3001]
velset = 0,0
ctrl = 0

[State 3000, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 3000, Special]
type = AssertSpecial
trigger1 = 1
flag = Invisible

[State 3000, BindToRoot]
type = BindToRoot
trigger1 = 1
facing = 1
pos = 0,0
time = 1

[State 3000, Flash]
type = EnvColor
trigger1 = Time <= 0
value = 240,240,240
ignorehitpause = 1
persistent = 0
time = 2

[State 3000, State]
type = ChangeState
trigger1 = Parent, HitPauseTime = 0
value = 3000

[State 3000, Destroy]
type = DestroySelf
trigger1 = Root, MoveType != A

;---------------------------------------------------------------------------

This way, you won't have to screw with messing up the animation, state times, or making variables to record how much time passed in the state.

This method, the helper object detects whether the root/parent player has made a successful hit with the opponent. If the player is successful, it will change to the flash screen state (in this case, state 3001) until the player's hitpausetime is over. Then it will go back to the original state (state 3000). However, if the player has made contact, but is NOT successful (opponent guards) the helper object will remain in the original state, therefore cancelling out the screen flash state.

When the player is done attacking in the super move state, the helper object will be removed, so the flash will not take effect for the other states.


I know this may sound obvious to some of you who are very experienced with mugen, but I hope it helps others too who want to use a technique like this. :)

"You must defeat my flaming
dragon punch to stand a chance."
Re: Helper style white flash screen upon move hit
#2  September 24, 2004, 06:28:11 am
  • *****
  • Tends to lose track of things a lot. :/
    • www.mugenguild.com/~winane/
What's the reason for the BindToRoot controllers?  ???

No need for the NotHitBy and AssertSpecial controllers if you just use a blank anim for the helper states.

Specifying IgnoreHitPause = 1 in StateDef 3001 does no harm, but it has no effect either, if the helper isn't doing any hitting.

Your code assumes that the HitDef doesn't specify pausetime = 0.

Why not just put something like this:
Code:
[State 2000, BAM]
type = HitDef
yada = yadayada

[State 2000, Epileptastic]
type = EnvColor
trigger1 = MoveHit
value = 240,240,240
IgnoreHitPause = 1
time = 2

[State 2000, Again!]
type = MoveHitReset
trigger1 = MoveHit
IgnoreHitPause = 1
in the root character's state instead?  (Completely untested, but seems like it ought to work.)
Still quite busy.

(Yes, I intend to deal with that stuff eventually, but kinda can't just yet, sorry. :/ )
Re: Helper style white flash screen upon move hit
#3  September 24, 2004, 07:36:08 am
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
The bind to root is so the helper always sticks with the player. So the helper won't go off the screen. I know it still may seem senseless, but IMO, I like it that way. :)

The not hit by controller is so that the opponent can not hit the invisible helper. :P

When I apply the EnvColor in the root chaarcter's state, when there is successful contact made and the player is STILL in that attack state, the flash will either always stay on screen, or it will not appear again until the character goes into different state number. :P


EDIT: Oohhh, after testing the MoveHitReset controller, that seems to work a lot better. Heck, I didn't even know there was a MoveHitReset controller to work with, only triggers.


EDIT 2: Also, if Im trying to do a move which changes to a state ONLY triggered to a move hit, then its impossible, since the MoveHitReset controller is Reset. Example, Shin Shoryuken, the alternate state for that is only triggered upon move hit, correct? Which is another reason for my helper object. ;)

"You must defeat my flaming
dragon punch to stand a chance."
Last Edit: September 24, 2004, 07:55:42 am by Neo Zero
Re: Helper style white flash screen upon move hit
#4  September 24, 2004, 07:53:07 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Could maybe use hitpausetime = 1 to remove the movehitreset. ???

Code:
trigger1 = Time <= 0
Is there a point when time is negative? ??? ???

Quote
EDIT 2: Also, if Im trying to do a move which changes to a state ONLY triggered to a move hit, then its impossible, since hte MoveHitReset is... Reset. Example, Shin Shoryuken, the alternate state for that is only triggered upon move hit. Which is another reason for my helper object.
What is a variable? ???


Many people risk their lives everyday by having Mugen.
Last Edit: September 24, 2004, 07:56:01 am by Messatsu

OrochiKOF97

Re: Helper style white flash screen upon move hit
#5  September 24, 2004, 11:53:01 am
Why would you use a helper for a simple EnvColor ?
Re: Helper style white flash screen upon move hit
#6  September 24, 2004, 05:37:27 pm
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
Because you can do much more things with helper objects than you can other objects.



Aahhh to hell with this, you guys are too smart/helpful.  ;)

With a bit of tweaking, and variable usage to detect movehit before resetting, I got the flash working without the helper object needed. :P

Thanks guys. :)


So this is what I have now for my character.
Code:
;---------------------------------------------------------------------------
; Player's Super Move
[Statedef 2000]

[State 2000, VarSet]
type = VarSet
trigger1 = Time <= 0
var(0) = 0

[State 2000, VarSet]
type = VarSet
trigger1 = MoveHit
ignorehitpause = 1
var(0) = 1

[State 2000, Flash]
type = EnvColor
trigger1 = MoveHit
value = 240,240,240
ignorehitpause = 1
time = 2

[State 2000, Reset]
type = MoveHitReset
trigger1 = MoveHit
ignorehitpause = 1

;---------------------------------------------------------------------------

I guess it does make things a lot easier. :)

"You must defeat my flaming
dragon punch to stand a chance."
Last Edit: September 24, 2004, 05:42:32 pm by Neo Zero

OrochiKOF97

Re: Helper style white flash screen upon move hit
#7  September 24, 2004, 06:49:08 pm
Note that you don't really need the movehit reset under Linux Mugen, you can stick with movehit = 1.
Re: Helper style white flash screen upon move hit
#8  September 24, 2004, 09:53:12 pm
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
Well... I'm not using linux mugen..

I can understand some of you are using Linux mugen, but I'm not one of them though.

But what is the difference, if they both work anyway?  ???

"You must defeat my flaming
dragon punch to stand a chance."

OrochiKOF97

Re: Helper style white flash screen upon move hit
#9  September 24, 2004, 10:50:09 pm
Quote
14 April 2002
=============

At a Glance
-----------
- Added zipped character support
- Some bugfixes

Code
----
- select.def: Added experimental ZIP character support (zipped storyboards not yet
  supported) .def file must have same name as .zip file
- CNS: New trigger: MoveReversed
- CNS: Modified triggers: MoveContact, MoveGuarded, MoveHit
       Return values now give information about time since hit status change.

I am using Linux Mugen and it'd shorten once again your code by simply removing the MoveHitReset state. Actually you don't even need to use a variable for such simple thing.

Re: Helper style white flash screen upon move hit
#10  September 25, 2004, 01:34:48 am
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
But If I remove the movehitreset object with the EnvColor still in place, the flash screen will always stay white, IINM instead of the flash.  :P

Even for those that still use DOS mugen, that lack the new/updated cns triggers only in win/linux mugen, don't you think?  ???

"You must defeat my flaming
dragon punch to stand a chance."

OrochiKOF97

Re: Helper style white flash screen upon move hit
#11  September 25, 2004, 01:50:13 am
I suggested that as a Linux version of the code. Of course you still need it for DOS one.
Re: Helper style white flash screen upon move hit
#12  September 25, 2004, 04:43:21 pm
  • *****
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net

  • Online
and what about a -2 state that displays a explod whenever the enemy is in a hit state, and the player is in a super attack? That'd be easier than making a helper and lots of states
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Helper style white flash screen upon move hit
#13  September 25, 2004, 04:58:15 pm
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
and what about a -2 state that displays a explod whenever the enemy is in a hit state, and the player is in a super attack? That'd be easier than making a helper and lots of states

 ???

Codes = Text based, not much KB usage

Sprites/Huge Explod, image based = Tonz of KB used if not MB.

"You must defeat my flaming
dragon punch to stand a chance."
Re: Helper style white flash screen upon move hit
#14  September 25, 2004, 11:41:36 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
640*480 one color image -> 11KB == tonz ???

Blah, you :still: need an assertespecial for the foreground and maybe the lifebars.


Many people risk their lives everyday by having Mugen.
Re: Helper style white flash screen upon move hit
#15  September 25, 2004, 11:49:42 pm
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
Dude. :P

People have come up with different ways of doing this, with proof.

I just named one way or two of doing it, and you come up with many other ways.

Besides, you can't change color of an explod when you have different ways of changing values of envcolor.

We all code characters differently.

Big deal. :P

"You must defeat my flaming
dragon punch to stand a chance."
Re: Helper style white flash screen upon move hit
#16  September 25, 2004, 11:59:06 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Quote
Besides, you can't change color of an explod when you have different ways of changing values of envcolor.
Sup paleFeX.


Many people risk their lives everyday by having Mugen.

OrochiKOF97

Re: Helper style white flash screen upon move hit
#17  September 26, 2004, 12:39:07 am
Who cares about PalFX, you should just block.
Re: Helper style white flash screen upon move hit
#18  September 26, 2004, 02:40:39 am
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr

"You must defeat my flaming
dragon punch to stand a chance."
Last Edit: September 26, 2004, 02:43:05 am by Neo Zero
A bigger insult.
#19  September 27, 2004, 02:48:33 pm
  • ******
  • ゴゴゴゴゴ
Re: Helper style white flash screen upon move hit
#20  September 27, 2004, 05:55:41 pm
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
topic lockededed.....  :P

"You must defeat my flaming
dragon punch to stand a chance."