Announcement

Collapse
No announcement yet.

How to disable ALL actor factories in Kismet using 1 custom kismet node?

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

    How to disable ALL actor factories in Kismet using 1 custom kismet node?

    I have the death kismet node linked up to disable an actor factory. This works. However, I was hoping to make a custom kismet node which would tell EVERY Actor Factory in the level to set bEnabled to false. This would save me having links all over the place in Kismet. I tried something like this:

    Code:
    event Activated()
    {
    local SeqAct_ActorFactory AF;
      foreach DynamicActors(class'SeqAct_ActorFactory', AF)
      {
      AF.bEnabled=false;
      }
    }
    but it doesn't work as Seq actions don't extend from Actor.UC

    What could I do please?

    Thanks

    #2
    not sure about the code side,but you can just use a bool connected to the enabled output of the actor factories.right click and expose the variable.then you can toggle the bool as needed.

    Comment


      #3
      Iterating Kismet nodes works slightly different since as you noticed they extend Object not Actor. The WorldInfo class has functions GetGameSequence and GetAllRootSequences which returns a single Sequence object or an array of those. You can call FindSeqObjectsByClass on the Sequence to find all ActorFactories. Note it's not an iterator, it returns the array of matching nodes as an out parameter.

      Comment


        #4
        Great thanks!

        Comment

        Working...
        X