Did you know? UBerserker loves the Dispersion Pistol.

uscript: How to catch spawned actors?

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

Moderators: Semfry, ividyon

User avatar zYnthetic
Skaarj Warlord Skaarj Warlord
Posts: 510
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 Lord Skaarj Lord
Posts: 151
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 !

User avatar zYnthetic
Skaarj Warlord Skaarj Warlord
Posts: 510
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 13 guests

Copyright © 2001-2024 UnrealSP.org

Powered by phpBB® Forum Software © phpBB Limited