Announcement

Collapse
No announcement yet.

Graceful method to "Hook" actors?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Graceful method to "Hook" actors?

    First of all, I'm not sure if "hook" is the verb I'm looking for. Basically what I'm trying to say is that I'm looking for a good way to get references to objects in my scene.

    In different words: say I have an invisible actor that performs some function. If I'm instantiating it in my code then I have no problem -- I can easily maintain references to it (obviously).

    The real issue is when I place an item in UnrealEd, for instance. Many of these objects I want to maintain references to, but the only solution I could really find was to do a bunch of AllActors iterators at the game start to "find" them all. I suppose the alternative is to write down the physical location in the game world and transfer these properties to the code so that the item automatically spawns exactly where I want it? This just seems too hard-coded to me.

    If anybody could offer any ideas about better ways of grabbing references to objects, let me know! Thanks in advance...

    #2
    The best way is to just do a traceActors in the prebeginplay(0 function and asign them to a variabel, it's how I made my explosive health all reference one library actor for any values I wanted to set via the mutator

    Comment


      #3
      There are several possible methods that are neater than iterators. For instance, one possibility is finding them when they are passed into a mutator's CheckReplacement function.

      Comment


        #4
        i'm not really dealing with mutators right now -- it's a whole new gametype sorta deal. are there any other good approaches?

        Comment


          #5
          There is nothing stopping you from using a mutator with a gametype. In fact gametypes have a default mutator which they automatically spawn for just such purposes (see DMMutator.uc).

          Comment

          Working...
          X