Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - fengshuifever

Pages: [1]
1
Hi,

I was wondering if irregular shaped clipping is supported at all. I had a quick glance at some posts from 2013 that suggested using Unity's cutout shader/depth mask.

What I'm trying to do is mask a slider bar (for health) behind a triangular shape.

Thanks in advance!

2
Gotcha!

My only other question is how would I convert an int (let's say Health is 30) to the individual positions of the scroll view's sprites ( 0 0 3 0) or would that be more of a general programming question rather than a NGUI question?

3
NGUI 3 Support / Re: Basing menu selection on Vector of joystick
« on: November 13, 2015, 12:49:09 AM »
Yep! I've tried this and have tried to set the UICamera.selectedObject to the button in that direction.
Here's a couple of ways I've tried and what's happened

( I should mention that I had to move away from the regular vector checks in the input, because there were way too many conflicts between buttons. The North, East, South, Western buttons were able to be selected but anything on a diagonal direction wouldn't select)

- I've set the direction of the joystick to spit out an 'angle' of direction (converted to a float), So when there is input and the direction is between -25 and 25, set the UICamera.selectedObject the the Item button (northern button). When this value is between 35 and 65, set the selected Object to the Equip Button (NorthEastern button). This way makes nothing selected at all. So I went and tried...

- Using the same method above, I've set the UICamera.hoveredObject to each button in question, the line directly after sets the UICamera.selectedObject to the currently hovered button.
Now THIS kind of works, it's hovers over onto and between the Item and Equip buttons absolutely fine, the problem is that the Item button has the selectedObject focus and the Equip button never has the selectedObject focus.

I've also popped in bool checks to execute said code when either is true (if itemhighlighted is true then call the ItemHighlighted function and select that button, same with the equip button) and those seem to be working correctly.

In other words, is there any trickery I should be looking out for when using and populating UICamera.selectedObject?

4
NGUI 3 Support / Basing menu selection on Vector of joystick
« on: November 02, 2015, 01:38:00 AM »
Hi all,

I was wondering if there was a way rather than using the standard Key Navigation if there was a way of using the direction of the Joystick to highlight a button.
Just an example would be, if the player moved the joystick up it would highlight the top menu button (x 0, y 1), or if the player moved the joystick to the top right (x 1, y 1) it would highlight the top right button.
Here's a quick (and terribly drawn) example of what I mean.

5
an image or example of what you are trying to accomplish would be helpful...

Oh, apologies! I thought the description would've been enough and the game reference BUT here's a youtube clip at the time of battle https://youtu.be/8nMh_Zys7Xg?t=1024
(if it doesn't jump to the point in the video, the timestamp is 17:14)

You can see in the video that Ness gets attacked and his health ticks down to the desired Health. (so it ticks down to 19 from 27 -- 8 HP Damage)

6
Basically the topic subject says it all, how would one go about creating a rolling health meter like Earthbound in a graphical or number-based way using NGUI.
For those unaware of how Earthbound does it, essentially when you get hit, your character's health meter rapidly ticks down but you'll be able to still attack and assign commands as long as your character's HP does not reach 0.

The next question would be would I tackle this through NGUI or would it be better to do it through regular Unity scripting then apply imagery to it using NGUI.

Thanks in advance!

7
NGUI 3 Support / Re: Setting a parameter based on which button has been hit
« on: November 01, 2015, 03:32:22 AM »
I actually found a way to do it (stupidly simple) to pass through an int, basically just creating a script to attach to all of the save file objects.
Thanks for the help though!

8
NGUI 3 Support / Setting a parameter based on which button has been hit
« on: October 25, 2015, 02:40:08 AM »
Hi all,

So I've had a good search through the forums and this question has kind've been asked but not exactly to the degree I'm trying to work out (but if it has, my apologies!).

Basically I have a Save File screen that comes up when the New Game button has been pressed.
Right now there's three buttons.
What I'm trying to do is depending on which button is pressed either
a) send a message to the selectSlot method which needs to take an int parameter of "slot" which is the Save File that has been selected
or
b) attach a separate script which records the name "Save File 1" or in any case "Save File x" and extracts the x as an int, which then passes the x into selectSlot.

I've tried a couple of things, such as storing all 3 slots into an array and trying to get which position of the array that button was clicked, except I'm unsure how to get WHICH button has been hit, obviously being just a simple loop, loops through all 3.

Has any one had any success on this part?

Pages: [1]