+ Reply to Thread
Results 1 to 2 of 2

Thread: Couple questions about idioms and such...

  1. #1
    Ascendant the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default Couple questions about idioms and such...

    Is there a good idiom for "wake me up when <X> is available", where X could be something like meaningful returns from Inspect.Unit.Detail() or whatever? I am in particular thinking of messing around with and/or capturing Inspect.Item.Detail() results, but I'd also want shard name and player name.
    You can play WoW in any MMO. You don't have to play WoW in RIFT. Oh, and no, RIFT is not a WoW clone. Not having fun any more? Learn to play, noob! I don't speak for Riftui, but I moderate stuff there. Just came back? Welcome back! Here's what's changed. (Updated for 2.5!)

  2. #2
    Rift Disciple
    Join Date
    Apr 2011
    Posts
    120

    Default

    if there's an event for "<X> has changed" you can sink that and check to see whether the change included something you're interested in (you know this already, but other readers of this thread might not).

    if there's no such event, you can sink the frame update event and poll to see if any of the things you're waiting for are available yet. to make it easy to add and remove things from the polling list, I suggest using coroutines. when you're interested in something that's not yet available, create a coroutine that checks to see if it is, and if so do whatever it is you want to do, then add that coroutine to a table. your frame update handler would then iterate through that table, resuming each one in turn. depending on the return value, you either leave the coroutine in the table for next time, or remove it because it got what it needed. depending on the number of coroutines in the table, you might want to throttle how many of them you resume each frame.

    -ken
    Snowreap Yellowtail Preyz Taralin
    < The Purge > Guardian Seastone

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts