Announcement

Collapse
No announcement yet.

Loot Spawners and other stuff.... Help!

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Loot Spawners and other stuff.... Help!

    Hi again!

    I need some more help!

    What I want to do is:
    To have a LootSpawnerMaster spawn randomly to one of its LootSpawnerSlaves an item. Then I want to change some of its properties right when the game starts.

    What I have done is:
    The item is a book, which since it will contain "dynamic" data relevant for the map, it should be randomly placed. I have noticed that the function that "spawns" the objects is a "PreBeginPlay()". I have a special actor that searches for any instance of ThObjectReadables (and any of its subclasses) for a special tag. When found, it writes the text on its first page. For this purpose, I created a subclass of ThObjectBook who's default Tag value equals the tag I want. The function that does the search and writes is a BeginPlay().

    What happens is:
    If I place a regular book on the map and ignore the Spawners. It gets written.
    If I use everything as mentioned above, with the lootspawners and the special classes, my function does not find it, even though it gets spawned.
    Why?

    Any help?

    Thx in advance!
    Kael
    "Nosce te ipsum et quies cortuum assequeris"

  • #2
    Hmm, what I would normally do is try to decide the book's contents from within the actual book subclass.

    Suggested (but possibly inefficient method):
    1. Add a subroutine to your book sub-class that defines the contents in a localised function
    2. Edit the Beginplay (or whatever) function that is called within the book, upon it's creation, so that it triggers the function that I mentioned in 1

    Therefore the function setting the contents can't be activated until the book exists & so there should be no rational reasons for this not working.

    Well, it could always go wrong, but give it a try anyway

    (& you've given me an idea for a nice new object to code)

    Comment


    • #3
      The problem I see with your solution is that you're assuming that I can decide what the book content is within the book. However that is wrong. The item that has the information that must go into the book is not the book.

      That however has reminded me of a possible solution.
      That is, even though the book does not have that info, he can always ask the other item what that info is, as soon as he begins to exist (with a simple field stating the what the other's tag is).

      I just hope that the time between his existence and the other item to create the required info is correctly synchronized. I will try and I will let ya know the result.

      Thx for the help!
      And I'm glad I've given you an idea of an item for you to code.
      Maybe you could state what it is? Or PM me?
      I'm interested.

      Cya,
      Kael
      "Nosce te ipsum et quies cortuum assequeris"

      Comment


      • #4
        Originally posted by Kael
        And I'm glad I've given you an idea of an item for you to code.
        Maybe you could state what it is? Or PM me?
        I'm interested.
        I suspect I'm thinking of a generalised object, for the situation that you might be trying to create:

        -A safe which is opened by a specific code (entered via buttons or whatever) but the thieves must first retrieve the code from a book somewhere in the level

        BUT

        -To prevent the thieves from just memorising the code, you have a choice of several codes, picked at random, & the code in the book must change to reflect that

        Therefore, I was thinking:
        -A ThReadableObject subclass that contains an array of possible entries that could be in the book.
        -An array of events to match the book entries
        -At the start of play, an entry is chosen at random & the corresponding event is triggered

        Therefore, the events would be used to physically activate whatever trigger is used to control the code & the book would be displaying the correct code.

        Sounds like it could be handy for saying:
        -where a certain key/objective was randomly placed
        or
        -the code to a safe/door

        It'd probably never get used, but sounds like it could be useful nonetheless, & I'm all for maps where the playing experience varies from game to game.

        Comment


        • #5
          ok. My idea worked.

          However the relevant info is only written when the player actualy frobs the item.
          It was the only way I managed to do it.

          Thx again!
          If it wasn't for your post, I hadn't done it this quick.
          "Nosce te ipsum et quies cortuum assequeris"

          Comment


          • #6
            Ask Usaar33 from TeamVortex (creators of Operation Na Pali , best singleplayer mod for UT ever) , he did similar things with console codes , random numbers displayed in the translator event and used by the console. The ONP/DeathBall team

            Comment


            • #7
              Thx!
              "Nosce te ipsum et quies cortuum assequeris"

              Comment

              Working...
              X
              😀
              🥰
              🤢
              😎
              😡
              👍
              👎