YesNoOk
avatar

DisplayToClipboard not working in Mugen 1.1? (Read 1742 times)

Started by Shadow97, June 04, 2019, 12:04:46 pm
Share this topic:
DisplayToClipboard not working in Mugen 1.1?
#1  June 04, 2019, 12:04:46 pm
  • avatar
  • *
    • Ukraine
I'm working on my character's AI and need to see if the calculations for the time needed for an enemy to fall and the time it'll take the character to reach that point and grab them with a special are correct.
Code:
[State -3]
type = DisplayToClipboard
triggerall = var(1) = 1200001
triggerall = var(3) = 0
triggerall = ctrl || stateno = 345 && movehit || stateno = 380 && movehit
trigger1 = fvar(0) := (-target,vel Y + exp(0.5*ln(target,vel Y ** 2 - 4 * (50 + target,pos Y) * .35))) / .7
trigger1 = fvar(1) := (target,pos X - pos X + target,vel X * fvar(0)) * facing / 15 + 18
text = "TFall = %f, TDash = %f"
params = fvar(0), fvar(1)
The triggers look a bit messy without context, but the Pause controller with exactly the same triggers I set up so it'd be easier for me to read the output works perfectly. I tried disabling it (iirc, state -3 doesn't tick during pause and if you're in the enemy's custom state), still nothing in my clipboard.
Did I do something wrong, or is it Mugen 1.1 screwing with me?
Re: DisplayToClipboard not working in Mugen 1.1?
#2  June 04, 2019, 05:14:25 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Most people just use "trigger1 = 1" for the DisplayToClipboard.

Why do you need all those conditions, just to display the clipboard?


But the problem is probably because you are trying to check 2 fvars at once.

How about do something like this so you can check both values, on and off?

[State -3]
type = DisplayToClipboard
trigger1 = GameTime%240 = 0 ;
text = "TFall = %f"
params = fvar(0)

[State -3]
type = DisplayToClipboard
trigger1 = GameTime%240 = 120 ;
text = "TDash = %f"
params = fvar(1)

Last Edit: June 04, 2019, 05:18:15 pm by altoiddealer
Re: DisplayToClipboard not working in Mugen 1.1?
#3  June 04, 2019, 05:30:50 pm
  • avatar
  • *****
  • Are you ready?
    • USA
or how about this? Whenever i see the display to clipboard type in a character's cns files i just removed them
Re: DisplayToClipboard not working in Mugen 1.1?
#4  June 05, 2019, 02:20:33 pm
  • avatar
  • *
    • Ukraine
Code:
[State -3]
type = DisplayToClipboard
trigger1 = 1
text = "DFall = %f"
params = fvar(1)

[State -3]
type = DisplayToClipboard
trigger1 = 1
text = "DFall"

Neither works.

drewski90, the problem is, it's my character, I'm developing it and I need to see the value of a variable. The only way to do that is via AppendToClipboard or DisplayToClipboard.
Re: DisplayToClipboard not working in Mugen 1.1?
#5  June 05, 2019, 02:40:44 pm
  • *
  • "The Ultimate Reploid"
Have you made sure both float variables are activated?? Otherwise, it will never display anything on the clip board.
Last Edit: June 05, 2019, 02:52:57 pm by The Omega Safeer
Re: DisplayToClipboard not working in Mugen 1.1?
#6  June 06, 2019, 02:39:08 pm
  • avatar
  • *
    • Ukraine
This is the first time I hear about variable activation. Mind telling me what exactly did you mean by that?
Re: DisplayToClipboard not working in Mugen 1.1?
#7  June 06, 2019, 03:52:48 pm
  • *
  • "The Ultimate Reploid"
My bad,

trigger1 = Var(x) = x

will always give true, even if there is no varset defined for the variable.

Anyways the issue is with this line:

Code:
triggerall = var(1) = 1200001

Otherwise your code works properly.
Re: DisplayToClipboard not working in Mugen 1.1?
#8  June 06, 2019, 03:57:18 pm
  • avatar
  • *
    • Ukraine
Thanks, but
Quote
the Pause controller with exactly the same triggers I set up so it'd be easier for me to read the output works perfectly
which means that there's no problem with this
Code:
triggerall = var(1) = 1200001
because it doesn't prevent the Pause SCTRL from executing (I initialized var(1) to 1200001 before the SCTRL would execute). Even more, I've set up the most basic of DisplayToClipboard controllers,
Code:
[State -3]
type = DisplayToClipboard
trigger1 = 1
text = "DFall"
No conditions, no fvars, but it doesn't work either.
Re: DisplayToClipboard not working in Mugen 1.1?
#9  June 07, 2019, 05:51:15 am
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Let’s see a screenshot showing your debug window with that simple code, if you don’t mind

Re: DisplayToClipboard not working in Mugen 1.1?
#10  June 07, 2019, 11:53:12 am
  • avatar
  • *
    • Ukraine
Code:
[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "test"

[State 0, Pause]
type = Pause
trigger1 = 1
time = 60

I've put the code above at the very end of state -3, so it should erase the debug flood, print out the message and then pause for a second.
Re: DisplayToClipboard not working in Mugen 1.1?
#11  June 07, 2019, 12:20:22 pm
  • *
  • "The Ultimate Reploid"
Its hard to tell if its working or not because the taskbar is blocking the area where this text is supposed to be displayed. Try taking a screenshot in full screen mode.
Re: DisplayToClipboard not working in Mugen 1.1?
#12  June 07, 2019, 12:37:10 pm
  • ****
    • crepa.neocities.org
Ok, so...
First, I'd put display to clipboard on state -2, not -3 (is just my preference, I think this makes no difference).
Second, if a variable is not being used it will just return a 0.

This is how I'd do that:

Code:
[State -2, Debug]
type = DisplayToClipboard
trigger1 = 1
text = "Dfall = %f"
params = fvar(1)
ignoreHitPause = 1
Re: DisplayToClipboard not working in Mugen 1.1?
#13  June 07, 2019, 12:39:23 pm
  • avatar
  • *
    • Ukraine
Quote
Try taking a screenshot in full screen mode

DeathScythe, State -3 was the reason. The message was displayed when I put the SCTRL -2. Thanks!
And yeah, The Omega Safeer, I never knew the message was supposed to appear at the bottom of the screen, so thanks to you too.
Re: DisplayToClipboard not working in Mugen 1.1?
#14  June 07, 2019, 12:42:23 pm
  • ****
    • crepa.neocities.org
Also, if you have another DisplayToClipboard controller, it will probably override your other controller. Looks like this is happening here.
Edit: oh, solved then. No problem :8):