Showing Output messages in Labels as Events occur

Home Forums iOS / tvOS Starter Kits The Story Tellers Kit 2 for iOS or tvOS Apps Showing Output messages in Labels as Events occur

This topic contains 2 replies, has 2 voices, and was last updated by  Scott 7 months, 3 weeks ago.

  • April 18, 2016 at 11:01 am #147346

    So…this is probably something that is easy to do or in a video that missed, but I am curious as to how to go about showing a message in a label only when the event has taken place. My thought is just to use the show/hide functionality, but I was wondering if a label could dynamically show the text from the output messages.

    Thanks for anyone who can point me in the right direction, and give Justin a break from answering my questions 🙂 There have been a lot

  • April 18, 2016 at 11:13 am #147348

    Yup totally possible. But essentially you’re creating your own Output variable and making the SKLabelNode equal to that. So your event is going to use a…

    SetValues dictionary (more info here) – with a key and value, essentially a variable and value. So that key might be WhatHappened and the value is “Went to town”.

    Your Labels dictionary ( more info here ) will have a sub dictionary with the name of the label, and within that use the property… TextWithSavedValue which will equal WhatHappened .

    So anytime, the value for WhatHappened changes, the kit knows to automatically update any label in the scene that is displaying the value of WhatHappened.

    And you could watch this video to learn more… http://cartoonsmart.com/tutorial-4-building-a-book-with-the-story-tellers-kit/

  • April 18, 2016 at 7:04 pm #147419

    Sheesh! I was about to write another question asking for further explanation, and then I thought to myself. Just follow exactly what was explained and don’t over think about what “I” think should happen or makes sense to me.

    You sir are a fantastic teacher! Worked to perfection. Went over it 7 times to understand, because in all honesty I was confused by explanation. But now it makes perfect sense. The way you explained forces me to learn and gives the answer as well. Awesome. Plus the forum is now a resource for when I ultimately forget how to do this down the road.

    Thank you

You must be logged in to reply to this topic.