Gianluco Posted June 27, 2022 I want to make a special action that kills the Boss1 actor after destroying (killing) all of the Altar actors. How do I do it? 0 Share this post Link to post
1 smeghammer Posted July 1, 2022 Here you go:https://github.com/smeghammer/snippets/tree/master/kill_cust_actor I used your script, but adapted to different TIDs (for the zombiemen and the custom cyberimp). Kill the zombiemen... #library "acslib.acs" #include "zcommon.acs" script 1000 ENTER{ print(s:"starting kill detect loop..."); While (ThingCount(T_NONE, 10) > 0) { Delay(10); } Thing_Destroy(11, 1); } Obviously, if you ant other things to happen on OPEN, you ill need to adapt accordingly. Notice I used the gib death flag set to TRUE (1) and omitted the sector tag flag (defaults to 0/any) You need to compile any changes to the script of course (acs.exe, slade, CLI etc...) 0 Share this post Link to post
1 Kan3 Posted June 28, 2022 If you're on UDMF, or anything that supports acs scripting, than you can just write a while loop to check if the Altars are "alive" and if they're not you call for Thing_Destroy (or whatever function you wish) to kill the boss. Spoiler Something like this: While (ThingCount(T_NONE, AltarTID) > 0) { Delay(35); } Thing_Destroy(BossTID, 0, 0); 0 Share this post Link to post
0 Gianluco Posted June 28, 2022 (edited) 7 hours ago, Kan3 said: If you're on UDMF, or anything that supports acs scripting, than you can just write a while loop to check if the Altars are "alive" and if they're not you call for Thing_Destroy (or whatever function you wish) to kill the boss. Hide contents Something like this: While (ThingCount(T_NONE, AltarTID) > 0) { Delay(35); } Thing_Destroy(BossTID, 0, 0); It doesn't work, I tried putting the Tag of the altars, but when I kill all of them, nothing happens. This is the script I put script 6 (void) { While (ThingCount(T_NONE, 800) > 0) { Delay(10); } Thing_Destroy(801, 0, 0); } Also, the boss has the INVULNERABLE flag, but not the NOKILLSCRIPTS one Edited June 28, 2022 by Gianluco 0 Share this post Link to post
0 ramon.dexter Posted June 29, 2022 How are you starting the script itself? What triggers it? 0 Share this post Link to post
0 Gianluco Posted June 29, 2022 3 hours ago, ramon.dexter said: How are you starting the script itself? What triggers it? A linedef at the start of the level that executes the script when walking over it 0 Share this post Link to post
0 smeghammer Posted June 29, 2022 See third map 'the gate' for an example of this I did a while back: https://github.com/smeghammer/hellbreach/tree/master/PK3 It doesn't kill something but actions something when the final barons are killed. 0 Share this post Link to post
0 Gianluco Posted June 30, 2022 13 hours ago, smeghammer said: See third map 'the gate' for an example of this I did a while back: https://github.com/smeghammer/hellbreach/tree/master/PK3 It doesn't kill something but actions something when the final barons are killed. Which script is it? 0 Share this post Link to post
0 Kan3 Posted June 30, 2022 On 6/28/2022 at 7:05 PM, Gianluco said: It doesn't work, I tried putting the Tag of the altars, but when I kill all of them, nothing happens. This is the script I put script 6 (void) { While (ThingCount(T_NONE, 800) > 0) { Delay(10); } Thing_Destroy(801, 0, 0); } Also, the boss has the INVULNERABLE flag, but not the NOKILLSCRIPTS one I use that in almost every map I made, so just try to add another action other than Thing_Destroy to see if that action or the boss is the issue. 0 Share this post Link to post
0 smeghammer Posted June 30, 2022 4 hours ago, Gianluco said: Which script is it? Look in the source acs code in /root/acs/ Line 176. Sorry I forgot how much other stuff was there. 0 Share this post Link to post
0 Gianluco Posted June 30, 2022 1 hour ago, smeghammer said: Look in the source acs code in /root/acs/ Line 176. Sorry I forgot how much other stuff was there. Ok, I found a difference with the code that Kan3 suggested. You put the identifier T_BARON, while I put T_NONE. Maybe that's what causing the issue? How do I give a custom actor an identifier? 0 Share this post Link to post
0 smeghammer Posted June 30, 2022 (edited) That's the TID is it not? It is defined in the decorate code for the custom thing. I'll check it when I get home and get back to you. EDIT - I mean the TID you ADD to the actor... Edited July 1, 2022 by smeghammer 0 Share this post Link to post
0 Gianluco Posted July 2, 2022 On 7/1/2022 at 10:59 AM, smeghammer said: Here you go:https://github.com/smeghammer/snippets/tree/master/kill_cust_actor I used your script, but adapted to different TIDs (for the zombiemen and the custom cyberimp). Kill the zombiemen... #library "acslib.acs" #include "zcommon.acs" script 1000 ENTER{ print(s:"starting kill detect loop..."); While (ThingCount(T_NONE, 10) > 0) { Delay(10); } Thing_Destroy(11, 1); } Obviously, if you ant other things to happen on OPEN, you ill need to adapt accordingly. Notice I used the gib death flag set to TRUE (1) and omitted the sector tag flag (defaults to 0/any) You need to compile any changes to the script of course (acs.exe, slade, CLI etc...) It looks like it's working now, thank you! 1 Share this post Link to post
I want to make a special action that kills the Boss1 actor after destroying (killing) all of the Altar actors. How do I do it?
Share this post
Link to post