Topic: Control Freak Input

Hi to all..
can i active/deactive control freak button in running fighting?
i.e. if player gauge meter is full then i want to enable power button. for fired a power

Share

Thumbs up Thumbs down

Re: Control Freak Input

With some modding, yes it's possible.  You'll need Source version.

But if the only function of that button is to execute that power when the gauge is full, then it won't work when the guage is not full, right?  So you shouldn't need to deactivate it.  Unless you want to keep it hidden until the gauge is full?

Share

Thumbs up Thumbs down

Re: Control Freak Input

Yes you are right

TouchZone powerButton = UFE.controlFreakPrefab.GetComponent<TouchController> ().GetZone ("Power");
        powerButton.Hide ();

I can hide and show the button from above code in UFE script
but when i should enable or show that button ?
is there any event/delegate for that?

Share

Thumbs up Thumbs down

Re: Control Freak Input

Unfortunately, no.  Current available events are here: http://www.ufe3d.com/doku.php/code. 

My suggestion would be to write one in for it.  Something like OnGaugeChanged(int value), or send the gauge value in OnHit() or OnMove() since that's when the gauge would change.

Failing that, a simple UFE.GetGauge() function might be enough too.

Let me know if you get stuck.

Share

Thumbs up Thumbs down

5 (edited by hardiknadiyapara 2015-02-03 01:01:58)

Re: Control Freak Input

Thank you for you help

one more query below code is i am currently writing for active/deactive power button

if(player1.currentGaugePoints  == MAXGUAGE){
//enable button here
}

is it good practice for enable power button ? i asking for suggestion smile
code i am writing in

OnHit

event

MAXGUAGE = Maximux guage value of a player

Share

Thumbs up Thumbs down

Re: Control Freak Input

I would check if it's >= not just == (sometimes hard to get precise values, also covers you in case it somehow goes over).

So you're adding to the OnHit event?  I'm guessing making it something like:

OnHit(HitBox strokeHitBox, MoveInfo move, CharacterInfo hitter, Float currentGuageValue)

Test and see how it works for your game.

Share

Thumbs up Thumbs down