Page 1 of 1

uscript: How to catch spawned actors?

Posted: 02 Sep 2016, 01:32
by zYnthetic
I'm working on a difficulty scaling mut which is basically changing pawn properties based on different conditions. Everything is done except I'm not sure how to catch actors spawned after startup, like pawns from creature factories or projectiles. Is there a function like ModifyPlayer called when other actors are spawned that I can use to filter with? CheckReplacement would work if I was replacing actors, but I'm not.

Re: uscript: How to catch spawned actors?

Posted: 02 Sep 2016, 03:50
by MrLoathsome
SpawnNotify perhaps?

Code: Select all

event actor SpawnNotification( actor A)
   {
      if (Book(A) == None) return A;

      /*  Do stuff to you book or whatever */
      
      return A;
   }

Re: uscript: How to catch spawned actors?

Posted: 02 Sep 2016, 19:39
by zYnthetic
That was the right place to look. Thanks!