YesNoOk
avatar

Explod problem (Read 13431 times)

Started by ihavenoinsight, August 19, 2024, 05:16:23 am
Share this topic:
Explod problem
#1  August 19, 2024, 05:16:23 am
  • avatar
Hi everyone
i have a question

Code:
;effect

[State ]
type = Explod
trigger1 = AnimElem = 1
removetime = 13
bindtime = -1
pausemovetime = - 1
postype = front
pos =  -190,100
anim = 10511
Scale = 1,1
sprpriority = 99999999
OwnPal = 1
ignorehitpause = 1
supermovetime = 999999999
pausemovetime = 999999999

i want to make effort like:
when i press A button
it will play once effect
when i press A button again
it will play again

(I used the code above which only play once )
Re: Explod problem
#2  August 20, 2024, 05:59:32 pm
  • *****
  • Shame on you!
    • USA
trigger1 = AnimElem = 1
This means it will only play at the beginning. Which ever state your character is in will have to be reloaded for it to happen a second time.

When you press A, Is that only during 1 particular state, or can the FX happen at any time?

You should add ID to the explod. Read up on all of the parts of explod >> https://mugenguild.com/forum/topics/explode-sctrls-169499.0.html
You'll want to use a triggerall = !numeplod(your explod ID) so that only 1 is on screen at a time.
vVv N00bSaibot & Muramasa RoofTop vVv
Re: Explod problem
#3  August 21, 2024, 03:15:21 am
  • avatar
emm
happen at any time
(when i press a button)

i add id
the gpt says that if i want to run the explot repeat i should use helper but i don't know how

 
Re: Explod problem
#4  August 21, 2024, 11:19:09 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
don't trust chatGPT
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: Explod problem
#5  August 21, 2024, 01:20:19 pm
  • avatar
:((
so how to do
Re: Explod problem
#6  August 21, 2024, 08:23:12 pm
  • *****
  • Shame on you!
    • USA
If the effect can happen at ANY time, Delete what you have and in statedef -2, put

Code:
    ;effect
     
    [State ]
    type = Explod
    trigger1 = command = "a" ;AnimElem = 1
    removetime = 13
    bindtime = -1
    pausemovetime = - 1
    postype = front
    pos =  -190,100
    anim = 10511
    Scale = 1,1
    sprpriority = 99999999
    OwnPal = 1
    ignorehitpause = 1
    supermovetime = 999999999
    pausemovetime = 999999999
But more than likely you don't want it to happen at ANY time. The command = "a" is the Trigger for the button press.
If you need to have the explod only happen when doing 1 move, then you put the explod in that move.

If there are more restrictions than just pressing A, then you make additional triggers. Each restriction will have to be "translated" into something Mugen/Ikemen knows how to read.
If you don't know how to tell Mugen what restrictions, tell us the restrictions and we can help you figure them out.
vVv N00bSaibot & Muramasa RoofTop vVv
Re: Explod problem
#7  August 22, 2024, 12:15:32 am
  • avatar
nope
it will still run once



:(:(:(
Re: Explod problem
#8  August 27, 2024, 07:20:17 am
  • avatar
Code:
;==Attack 1
[Statedef 230]
type = S
movetype = A
physics = S
juggle = 4
poweradd = 42
ctrl = 1 ;
anim = 230
sprpriority = 2

;effect
[State 230, 1]
type = Explod
trigger1 = Time = 1 && command="a" && !(NumExplod(10511) > 0)
removetime = -1
anim = 10511
pos = -190, 100
Scale = 1, 1
sprpriority = 9999
ignorehitpause = 1

[State 230, 2]
type = PlaySnd
trigger1 = Time = 2 && command="a" ;
value = 0, 1

[State 230, ステート変更]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

and with this code form liner ai
neither of the effect and sound can't play

how
Re: Explod problem
#9  August 30, 2024, 12:14:56 am
  • *****
  • Shame on you!
    • USA
"Time= " increases every tic. One second in our time, Mugen has 60 tics. The average person can click a button once every 14 tics. That means 4 times in 1 second. You expect them to hit the button 60 times in one second.

trigger1 = Time = 1 && command="a" && !(NumExplod(10511) > 0)
^^^ This can be used properly in Mugen, But NOT for what you are trying to accomplish. This would be to set a variable, or spawn something, or so the player has to hold a button down. It can be used for a ton of reasons.

Time = 1 means this only happens ONCE at the VERY beginning of the move.

Spoiler, click to toggle visibilty

The playsnd isn't ideal. You should have it above the Explod so that the 2nd time it should work there is no explod 10511. If it's below the explod the explod will spawn and it will not work. If it does not check to see if explod 10511 is on the screen, Every tic P1 holds A down, it will play. So you can imagine holding down A and the sound happens 60 times in 1 second.

Is the 10511 explod some place else or did you forget to label the ID??
vVv N00bSaibot & Muramasa RoofTop vVv