playMaker

Author Topic: Would an NGUI discussion thread be a good idea?  (Read 3325 times)

Red

  • Hero Member
  • *****
  • Posts: 563
Would an NGUI discussion thread be a good idea?
« on: July 21, 2013, 08:37:16 PM »
I've finally bit the bullet and invested in the NGUI package and no longer am limited to the trial (which though i do understand why it's not given as much support as the full version) and right now i'm not sure what all the functionality is or how to access it because it's all coding-based on the forums.

And mainly i'm trying to figure out where to let NGUI do it's thing and where to have Playmaker take over.

Would this be a thread that people would be interested in? a sort of "general stuff" kinda thing?

If so, well, i'll start... I'm trying to make a system that has progress bars that can be offset when the weapon that that bar represents (it's a progress bar to give the player visual feedback when the weapon they're using is cooling down.) and i've been suggested to use the offset script but i'm not sure how to hook it up to be fired off by an event in Playmaker as the person kinda gave me a chunk of code to use... is this as simple as just applying that NGUI-to-FSM add on and just firing that off? (i was under the impression that that's more of a detector and not a "sender of messages to NGUI" kinda thing.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Would an NGUI discussion thread be a good idea?
« Reply #1 on: July 28, 2013, 05:37:11 PM »
hi,

 Yes, this is very much welcome, I am currently working heavily with ngui on my r.mote project, and the package I provide on the wiki is heavily based on this experience, so It would be good to hear where you are finding issues or difficulties on integrating and working with ngui and playmaker.

bye,

 Jean

Swifty

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Would an NGUI discussion thread be a good idea?
« Reply #2 on: July 29, 2013, 08:27:58 AM »
Red,

Your question is a little unclear to me. What do you mean by:
"progress bars that can be offset when the weapon that that bar represents /.../  is cooling down"
I'm guessing you want a progress bar for each weapon that then ticks down to zero as the weapon cools down.

If this is the case my suggestion would be to have an FSM on the player that
-sets 2 global variables. i) Weapon ii) Cool-down time required (total amount)
-Sends an FSM event (startCooldown) to the progress bars FSM
On the Progress bar FSM track each weapons cool down state and display the cool-down time remaining for the selected weapon.

[My Question] I currently trying work out how to pass an event when NGUI is not clicked on, Any tips?

Bit of context:
I have a button that when its clicked on displays some information.
When I click on the main screen area I want this information to stop being displayed

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Would an NGUI discussion thread be a good idea?
« Reply #3 on: July 29, 2013, 08:55:35 AM »
Hi,
 
 have you tried to have a invisible collider behing everything? then if you get a mouse up it means it's clicked on nothing else.

bye,

 Jean

Swifty

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Would an NGUI discussion thread be a good idea?
« Reply #4 on: July 29, 2013, 09:29:57 AM »
Thanks jeanfabre,

I did it similarly to how you suggested. I added a background collider behind everything. I also added a UIEventListner Script to it and a NGUIEventToPlaymakerFSM script. On the backgound collider FSM I added a OnClick global transition which broadcast a OnSelectionChange NGUI event, which I picked up and used in my GUI.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Would an NGUI discussion thread be a good idea?
« Reply #5 on: July 29, 2013, 09:55:32 AM »
Hi,

 good, as for Red question, I too would like some rephrasing, I can't make sense of it :)

bye,

 Jean