YesNoOk
avatar

another trigger issue with time content (Read 399 times)

Started by Zodiac Uchiha, October 16, 2010, 10:34:52 pm
Share this topic:
another trigger issue with time content
#1  October 16, 2010, 10:34:52 pm
  • **
    • Germany
hi there !
got a problem here. i want to use the trigger tickspersecond, but FF doesnt know this trigger. so it seems at least.

what i wanna do is the following :
you all know the hyper combo finish BG animation , right ? and the voice sound "hyper combination finish"?
i want this sound to trigger 1 oder 1/2 second after p2life = 0. like this :
trigger1 = (numexplod(666) != 0)
trigger1 = p2life = 0 && "after 1/2 second when p2life reaches 0"
   

and i thought i could write it this way :
trigger1 = time > 0.5 * tickspersecond

but that wont work, of course, because the time trigger is used here.

but as i said, FF doesnt know that trigger... usually, triggers get black color when they are written correctly. and this one doesnt. thats why i think its not integrated or i dont know how to use it. do you know the answer ?
Re: another trigger issue with time content
#2  October 16, 2010, 10:47:30 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You have used it in the same manner as the docs.

Why are you relying on what FF knows about to define whether something will work in mugen or not? It is a 3rd party app to make creating easier. It's not integrated with the engine. Run it and see what happens. Just cos FF doesn't syntax highlight something doesn't make it wrong.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: another trigger issue with time content
New #3  October 16, 2010, 11:06:37 pm
  • *****
  • Most dangerous person in Mugen
    • USA
    • caddie.smeenet.org
You can't use the time trigger that way, it's detects how long you've been in a state. Also, the trigger says "if the time is > half a second, play the snd" because of the greater than sign. If you do that with snd it fucks it up because it keeps activating the snd.

I'd suggest creating a variable with this:

[stateno -2, var]
type = varadd
trigger1 = p2life = 0
v=_
value = 1

Then use

trigger1 = var(_) = (.5 * tickspersecond)

For the trigger on the snd

Make sure you reset the variable at the start of the next round. oh and of course team mode fux this coding all to hell. Fucking team mode. Also I don't know what would happen if the game is running at 1 tick per second, but why the hell would anyone be running the game that slow?

Redid the whole post because I'm dumb.
Last Edit: November 01, 2010, 01:28:25 am by MD Caddie
Re: another trigger issue with time content
#4  October 17, 2010, 01:02:18 am
  • **
    • Germany
umm...the trigger "time" returns the time in gameticks , a player has spend in that state so far. i know that. and i also know that i cant change the meaning of that trigger at will =)

and i wanted to use "tickspersecond". but it doesnt work. I tried it of course btw despite of FF not displaying it black.
I just thought, that FF is programmed in a way , that the triggers only work when they are displayed in black when written correctly. but dont worry. i am trying things no matter what FF says

what i dont understand is, why would you use varadd ?

and the expression
var(_) = (.5 * tickspersecond) 
 
doesnt make sense to me atm. can you explain it what exactly it shall do ?

would this here not suffice if we take your thinking ?
trigger1 = !p2life = (0.5 * tickspersecond)  ; this here wouldnt be any different would it ?
trigger1 = (NumExplod(666) != 0)

i dont understand the "=" after !p2life.  in your expression it is after "var(_)"
du you know what i dont understand ? i tried this of course, but it didnt work.


Last Edit: October 17, 2010, 01:05:45 am by Zodiac Uchiha
Re: another trigger issue with time content
New #5  October 17, 2010, 01:32:21 am
  • *****
  • Most dangerous person in Mugen
    • USA
    • caddie.smeenet.org
Quote
would this here not suffice if we take your thinking ?

trigger1 = !p2life = (0.5 * tickspersecond)
trigger1 = (NumExplod(666) != 0)

No, look at what that means. "trigger when player 2's life does not equal .5 times tickpersecond". Meaning if the tickspersecond is 60, then the snd is gonna trigger whenever player 2's life isn't 30.

I used a variable because it's an effective way to keep track of how many ticks has passed since player 2's life equals 0.

Quote
var(_) = (.5 * tickspersecond) 
 
doesnt make sense to me atm. can you explain it what exactly it shall do ?


That means "trigger the sound when the value of the variable equals .5 times tickspersecond". for example, say the tickspersecond is the default, 60. So...

trigger sound when var(_) = (.5 * 60) or, simplified

trigger sound when var(_) = 30

With the way i set up the variable, it add ones for every tick after the second player has died. I left something out though

trigger1 = var(_) = (.5 * tickspersecond)ceil

That way, you won't ever have to worry about .5 values.
Last Edit: November 01, 2010, 01:42:06 am by MD Caddie
Re: another trigger issue with time content
#6  October 17, 2010, 03:13:31 am
  • **
    • Germany
well i tried the method of yours, and wrote it exactly how you told me, and it doesnt work.
but thank you anyway for trying to help me. =)

all i want is, the sound being played 30 ticks after p2life = 0 and during numexplod (666) is active

triggerall = numexplod(666) != 0
trigger1 = p2life = 0                                              ; + 30 ticks

there must be a way to achieve this.
Re: another trigger issue with time content
New #7  October 17, 2010, 03:18:10 am
  • *****
  • Most dangerous person in Mugen
    • USA
    • caddie.smeenet.org
Ok, if that's what you want, don't use that trigger i gave you. Use this instead:

trigger1 = var(_) = 30

Make sure you use a number instead of the _ i put there

Also, make sure you put

[stateno -2, var]
type = varadd
trigger1 = p2life = 0
v=_
value = 1

In statedef -2.
Last Edit: November 01, 2010, 01:23:59 am by MD Caddie
Re: another trigger issue with time content
#8  October 17, 2010, 03:34:51 am
  • **
    • Germany
still doesnt work.
 i used a variable that wasnt used yet of course.
i wrote the part in state -2
and wrote it this way in the state of the super

triggerall = (numexplod(666) != 0)
trigger1 = var(666) = 30

and it doesnt play the sound.
Re: another trigger issue with time content
New #9  October 17, 2010, 03:49:23 am
  • *****
  • Most dangerous person in Mugen
    • USA
    • caddie.smeenet.org
Variable 666 is invalid. Unless it changed in mugen 1.0 and you're using it, the limit is 59.

Edit: Also, don't put that in the super state. Put it in -2, too.
Last Edit: November 01, 2010, 01:30:26 am by MD Caddie
Re: another trigger issue with time content
#10  October 17, 2010, 11:50:32 am
  • **
    • Germany
didnt work again...
btw... i just learned something new with the variables being a valid definition until 59. thx for that =)
this time, thats how i wrote it :

[state -2, var]
type = varadd
trigger1 = p2life = 0
v = 29
value = 1

; and now the super state part

[State 3505, snd] ; Hyper-Combo-Finish-SND
type = PlaySnd
trigger1 = var(29) = 30
trigger1 = (NumExplod(7021) != 0)
ID = 7021
value = s4,0
volume = 255
channel = -1
ignorehitpause = 1   ; i could leave that out, because he cant be hit, due to "nothitby"


i tried different variables, too. just in case the one i choose at the start was already used.
Re: another trigger issue with time content
New #11  October 17, 2010, 12:07:00 pm
  • *****
  • Most dangerous person in Mugen
    • USA
    • caddie.smeenet.org
Did you move the playsnd to statedef -2?

Remove the id in the playsnd. Change the channel to a positive number(my own personal recommendation). Check and see if the snd is valid.  Finally, if all else fails, I would add in a displaytoclipboard to check if the variable is activated and the explod is correct:

[State -2, Display]
type = displaytoclipboard
trigger1 = 1
text = "var(29) = %d numExplod(7021) = %d"
params = var(29), numExplod(7021)

Put that in your -2, then open up the white debug text with ctrl d during gameplay. See if var(29) starts counting up when the opponent dies, and if numexplod(7021)=1 when you do the super finish.
Last Edit: November 01, 2010, 01:43:05 am by MD Caddie