I want to set the final battle with the Cyberdemon to end when every monster tagged 666 in a room is killed.
Problem is, the monsters tagged with 666 just spawn with the SpawnSpots scripted when Cyber takes damage and as such, the script think there are no 666 monsters yet.
http://www.hatebin.com/rzbzsmfuas
I have tried a lot of things including running the script on Cyber's death, adding a ACS_Execute after the final break;, going "script 23 ENTER" or open treats them like runaway scripts, tagging Cyber with 666, tagging the imps already on the room with 666 and everything failed.
Problem scripting a final battle.
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Re: Problem scripting a final battle.
Set your cyberdemon to trigger an ACS script (e.g., Script 20). Try the following script:
Unless I'm misunderstanding you completely, and you want the reverse - kill all the tagged enemies and the cyberdemon dies with them. In which case the same script can be used with a bit of tweaking.
Code: Select all
script 20 (void)
{
while (thingcount (0, 1)) //count Cyberdemon; wait until its dead
{
delay(8);
}
{
Thing_Destroy (666); //Destroys enemies tagged 666
}