ACS_Terminate isn't terminating.

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

ACS_Terminate isn't terminating.

Post by Ceeb »

I have a script here that causes rapid, constant damage, and the only way I found to cancel it is fairly hacky. But it should still work. Here, it's easier to show what I'm talking about...

Code: Select all

script 98 (void) //Rapid lava damage
{
thing_damage2(1000,1,"Fire");
delay(2);
restart;
}
Using the Actor Hits Floor sector actions, this script it activated. As you can see, it damages the player (who I gave a TID of 1000 to in another script) with fire based damage incessantly. How do you stop this? Simple! Get back on non-magma ground.

Code: Select all

script 99 (void) //Script 98 terminator
{
acs_terminate(98,34);
}
...Where another Actor Hits Floor activates this script, which should kill script 98. It doesn't kill script 98. I've even tried puking script 99, and it doesn't work! :? I looked at the ACS_Terminate article, I double-checked everything, but nothing is wrong!
dennisj1
Posts: 399
Joined: Sun Jan 11, 2004 1:46 pm
Location: Superior, WI

Re: ACS_Terminate isn't terminating.

Post by dennisj1 »

Is the second argument (34) the correct map number? Try passing zero (0), instead.
User avatar
Zhs2
Posts: 1300
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere
Contact:

Re: ACS_Terminate isn't terminating.

Post by Zhs2 »

Is script 98 called by [wiki]ACS_ExecuteAlways[/wiki]? Scripts called by said command can NEVER be terminated with terminate or ACS_Terminate.

Try [wiki]ACS_Suspend[/wiki], perhaps?
User avatar
Pedro vc
Posts: 167
Joined: Fri Oct 10, 2008 4:56 pm

Re: ACS_Terminate isn't terminating.

Post by Pedro vc »

Probably the map number is wrong. Check it.
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: ACS_Terminate isn't terminating.

Post by Ceeb »

No, it was map 34. That was right. But changing that number to 0 made it work exactly as I intended! :)
User avatar
Zhs2
Posts: 1300
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere
Contact:

Re: ACS_Terminate isn't terminating.

Post by Zhs2 »

Ah, yes... A good point to remember with the "map" argument of ACS_Execute and its variants is that 0 refers to the "activator" (or, activating map) of the script, much like 0 in an ActivatorTID arg refers to the actor that activated the script. :wink:
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Re: ACS_Terminate isn't terminating.

Post by Apothem »

Zhs2 wrote:Is script 98 called by [wiki]ACS_ExecuteAlways[/wiki]? Scripts called by said command can NEVER be terminated with terminate or ACS_Terminate.

Try [wiki]ACS_Suspend[/wiki], perhaps?
To compensate for that, add a statement that terminates the script internally via a flag. This also maintains MP compatibility...
User avatar
Ceeb
Posts: 5125
Joined: Wed Jun 11, 2008 4:07 pm
Location: Castle Wut

Re: ACS_Terminate isn't terminating.

Post by Ceeb »

Don't care about multi player, my WAD is strictly a single player adventure.
Locked

Return to “Editing (Archive)”