This is a test. Test! Consider yourself tested.

uscript: How to catch spawned actors?

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: Semfry, zYnthetic, ividyon

User avatar zYnthetic
Trustee Member Trustee Member
Posts: 507
Joined: 12 Nov 2007, 00:10

Subject: uscript: How to catch spawned actors?

Post Posted: 02 Sep 2016, 01:32

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.
Image

User avatar MrLoathsome
Skaarj Assassin Skaarj Assassin
Posts: 148
Joined: 01 Jan 2009, 08:24
Location: MrLoathsome fell out of the world!

Subject: Re: uscript: How to catch spawned actors?

Post Posted: 02 Sep 2016, 03:50

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;
   }
Mooo !

ECoop -> http://ecoop.ucoz.com/

User avatar zYnthetic
Trustee Member Trustee Member
Posts: 507
Joined: 12 Nov 2007, 00:10

Subject: Re: uscript: How to catch spawned actors?

Post Posted: 02 Sep 2016, 19:39

That was the right place to look. Thanks!
Image


Who is online

Users browsing this forum: No registered users and 3 guests