YesNoOk
avatar

Simple PalFX not working (IKEMEN) (Read 51053 times)

Started by K-Fox, February 20, 2023, 07:11:36 am
Share this topic:
Simple PalFX not working (IKEMEN)
#1  February 20, 2023, 07:11:36 am
  • **
  • Blue is cool.
    • USA
In my Bonus Game, there is a mini-boss called "Vehelits" that uses a Hitoverride to go into a unique hit state, where its supposed to flicker with this simple PalFX:

Code:
[State 5201, 5] ;Blink black
type = PalFX
trigger1 = Time%3 = 0
time = 1
add = -250,-250,-250 ;256,256,256
;mul = 255,255,255
ignorehitpause = 1
persistent = 1

But for some reason it doesn't work. The flicker effect doesn't show at all. I've checked everything I know that could cause PalFX to not work, but nothing seems to help. The PalFX works fine when put on a normal character, but not on Vehelits (which is a Helper, but I don't think that is the reason the PalFX doesn't work. The Vehelits helper does have the "ownpal = 1" parameter).

There are other PalFX state controllers in my Bonus Game, but I've made sure that they can't activate on this particular enemy (they also flat out can't activate for any enemy if a certain setting in the Config file is set to 0, which it was when I was testing this). So they can't be interfering with the flicker PalFX.

I can't seem to figure out why this PalFX won't work. Am I missing something extremely obvious? Or did I stumble upon an IKEMEN bug?

If you want to play the Bonus Game to see for yourself, you might want to set the difficulty to "Very Easy" so that you can get to Vehelits quickly, and also make sure the game mode in the Config file is set to 0 (Normal). Once you get to Vehelits, hit it with a weak attacks (so you don't KO it quickly because of its reduced Life) and observe the results; Vehelits should flicker but doesn't.

Here is the hit state for Vehelits:
Spoiler, click to toggle visibilty

This state can be found in the "EStates2.cns" file starting from line 17584.
Sometimes I listen to video game music more than I actually play the game.
Check out my Bonus Game & Characters!: http://mugenguild.com/forum/topics/streets-rage-2-bonus-game-11-chars-162092.0.html
IKEMEN Version: https://mugenguild.com/forum/topics/streets-rage-2-bonus-game-ikemen-version-update-728-196297.0.html
Last Edit: February 25, 2023, 12:47:23 am by K-Fox
Re: Simple PalFX not working (IKEMEN)
#2  February 24, 2023, 05:35:58 am
  • *****
  • Shame on you!
    • USA
Make sure you're using Debug so you can see that your state is up.
I threw your black blinking palfx on one of my char's helpers and it does blink black. So that works.
From what you said, it sounds like the code to block other palfx from happening might be blocking ALL palfx from happening.
I'd comment out that code and test to see if it's going to work.
You might just need to add some triggers. like
triggerall = numhelper(718)=0 ;or
root,stateno !=21350 ;change this to your state.
or any other check to allow the palfx to work. only during the state you want. 
vVv Ryuko718 Updated 10/31/22 vVv
Re: Simple PalFX not working (IKEMEN)
#3  February 25, 2023, 12:47:00 am
  • **
  • Blue is cool.
    • USA
This is weird. I got the PalFX to work, but found something really odd about this "fix". I changed the above PalFX to this:

Code:
[State 21351, PalFX] ;Blink black
type = PalFX
trigger1 = Time%3 = 0
time = 3
add = -250,-250,-250 ;256,256,256
;mul = 255,255,255
ignorehitpause = 1
persistent = 1

All I did was change the "time" parameter from 1 to 3. Vehelits now flickers as it should with the "broken" PalFX; 1 frame almost solid black, 2 frames with normal appearance, repeat until leaving the hit state.

But the time parameter is 3, so it shouldn't cause the PalFX to last only 1 frame, it should be 3 frames. I did a test with this new PalFX on another character and a helper of that character, and both had the PalFX applied permanently as the PalFX was constantly activating as it wore off.

This bugged me a lot, so I looked at another PalFX bug in my Bonus Game and after several hours of testing I found something strange.

If a Helper with an "ownpal = 1" parameter creates another Helper with an "ownpal = 0" parameter, the original Helper has the duration of any PalFX on itself reduced by the number of "ownpal = 0" helpers it created. To test and prove this, I made a test character using Kung Fu Man. What I did is make it so that by pressing the a/b/c/x/y/z buttons, KFM goes into a state, summons a helper, then that helper summons more helpers that have "ownpal = 1" or "ownpal = 0" depending on the button used for the test.

Here is the test character: https://www.mediafire.com/file/akpxiwnydihcnjc/ownpalBug.zip/file

Select this character in Training mode. Each of the normal six buttons (a/b/c/x/y/z) will snap KFM into the center of the screen and turn him invisible, then a Helper will be created, along with some other smaller helpers. The larger Helper will have a PalFX on it. The smaller helpers have "ownpal = 1" if a, b, or c was used to start the test, and "ownpal = 0" is x, y, or z was used. Press any button after starting a test to return to state 0 so you can try another button. The results of each test should be as follows:

a/x = Creates 1 smaller helper. The PalFX for the larger helper is:
Code:
[State 21351, PalFX] ;Blink black
type = PalFX
trigger1 = IsHelper(4000) || IsHelper(4004)
trigger1 = Time%3 = 0
time = 1
add = -250,-250,-250 ;256,256,256
;mul = 255,255,255
ignorehitpause = 1
persistent = 1
The larger Helper flickers normally with the "a" test, but doesn't flicker with the "x" test (time parameter is being reduced by 1?)

b/y = Creates 4 smaller helpers. The PalFX for the larger helper is:
Code:
[State 21351, PalFX] ;Blink black
type = PalFX
trigger1 = IsHelper(4002) || IsHelper(4005)
trigger1 = Time%6 = 0
time = 5
add = -250,-250,-250 ;256,256,256
;mul = 255,255,255
ignorehitpause = 1
persistent = 1
The larger Helper stays "darkened" for 5 frames then is normal for 1 frame with the "b" test, but with the "y" test its reversed; the larger helper stays "darkened" for 1 frame, then is normal for 5 frames (time parameter is being reduced by 4?)

c/z = Creates 9 smaller helpers. The PalFX for the larger helper is:
Code:
[State 21351, PalFX] ;Blink black
type = PalFX
trigger1 = IsHelper(4003) || IsHelper(4006)
trigger1 = Time%10 = 0
time = 10
add = -250,-250,-250 ;256,256,256
;mul = 255,255,255
ignorehitpause = 1
persistent = 1
The larger Helper stays solid black permanently with the "c" test, but with the "z" test it only flickers black for 1 frame, then is normal for 9 frames (time parameter is being reduced by 9?)

This is really bizarre. It must be an IKEMEN bug. I'll make sure to always use "ownpal = 1" for any helper created by another Helper.
Sometimes I listen to video game music more than I actually play the game.
Check out my Bonus Game & Characters!: http://mugenguild.com/forum/topics/streets-rage-2-bonus-game-11-chars-162092.0.html
IKEMEN Version: https://mugenguild.com/forum/topics/streets-rage-2-bonus-game-ikemen-version-update-728-196297.0.html
Last Edit: February 25, 2023, 12:53:36 am by K-Fox