YesNoOk
avatar

Prevent a Explod From Flipping? (Read 1427 times)

Started by 7thHeaven, November 10, 2024, 01:36:32 am
Share this topic:
Prevent a Explod From Flipping?
#1  November 10, 2024, 01:36:32 am
  • 你为什么要读这个??
    • China
im having a major brain fart rn and i for the life of me cannot figure out how to get this explod to not flip once the player is on the opposite side of the screen.

the current code is this:
Code:
[State 210, Cut In Summon, P1]
type=Explod
triggerall= ID < enemy,ID
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=9000
ID=9500
postype=back
pos = 0,0
bindtime=1
removetime=-2
sprpriority= 1
ownpal=1
ignorehitpause=1
scale = 0.255,0.255
facing = 1

facing = 1 does nothing and someone in another thread recommend doing ifelse(facing =1, 1, -1) but that just makes it so the explod doesn't up at all. btw, the explod is designed relative to a 1280 resolution due it being a full game asset, which is why it doesn't have a pos.

any help would be appreciated!
你为什么要读这个??
Re: Prevent a Explod From Flipping?
#2  November 10, 2024, 02:12:22 am
  • ****
    • Brazil
    • lyricasky.neocities.org
facing = ifelse(facing = 1, 1, -1)

edit: wait, using this makes the explod not show up? is this a full screen explod? maybe it is appearing offscreen?
you can try placing the sprite at the center of the x axis, if it's not there already.
Last Edit: November 10, 2024, 02:18:12 am by Lyrica
Re: Prevent a Explod From Flipping?
#3  November 10, 2024, 09:39:52 am
  • ******
    • Portugal
    • network.mugenguild.com/pots/
Full screen not flipping? Why not postype left?
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.
Re: Prevent a Explod From Flipping?
#4  November 10, 2024, 04:18:46 pm
  • 你为什么要读这个??
    • China
Full screen not flipping? Why not postype left?

Thanks for the suggestion! I changed the postype to left and I played around with the ifelse code and eventually got it to work!

Updated code is this:
Code:
[State 210, Cut In Summon, P1]
type=Explod
triggerall= ID < enemy,ID
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=9000
ID=9500
postype=left
pos = 0,0
bindtime=1
removetime=-2
sprpriority= -2
ownpal=1
ignorehitpause=1
scale = 0.255,0.255
facing = ifelse(facing = -1, 1,1)
你为什么要读这个??