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?
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?
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.
5 2015-02-03 01:01:00 (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
code i am writing in
OnHit
event
MAXGUAGE = Maximux guage value of a player
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.