Search Unity

Text Adventure Game Use Items

Discussion in 'Community Learning & Teaching' started by DoctorWeber, Aug 14, 2018.

  1. DoctorWeber

    DoctorWeber

    Joined:
    May 1, 2018
    Posts:
    1
    Hello!

    The Text Adventure Game tutorial is outstanding. I have a question about using items. The one item we use in this game, the skull, is coupled to a specific room. What if I wanted to use it for another room? The action response is SkullInOrbRoom. When we use the skull, it triggers the SkullInOrbRoom Action Response. It has a required string: orb room. If I add another room and add a second Use Input Action to the Skull and set the Action Response to, say, SkullInNewRoom, then how do I get the game to recognize the second Use Action Response? Maybe a better example is what if I wanted to make a sword item that I could use in a variety of rooms; how would I make it so that I could dynamically change the required string to match the room the player was in?

    Thank you!