Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Sign in to follow this  

Array + SpawnSpotFacing + ScriptExecute


So I might be asking something that can't be fees-ably done in ACS (directly) but, is it possible for a group of enemies to spawn in via ACS AND execute a script once ALL of the enemies are dead if said enemies are randomly chosen from an array? I know it's possible to spawn in a bunch of enemies with a set ID but I'm not sure if there's a way to check if they're alive and/or  to give the actor the "ScriptExecute" function.

Share this post

Link to post

1 answer to this question

Recommended Posts

  • 1

If you give all the monsters in the group the same TID, you can check how many are still alive with ThingCount, with T_NONE and the first parameter (because you are not checking for a specific type of thing) and the TID as the second parameter.  You could spawn them and then do what you want to when they're all dead in the same script, which would be checking ThingCount in a loop until it is 0, and then continuing.  Remember to put a delay in that loop so you won't have a runaway script.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this