Jump to content
  • 0

Pausing ACS?


StevenC21

Question

Basically, I have a script. It needs to do some things. It needs to, when a button is pressed, begin raising a ceiling, when that is done, raise another, and then another. While this is happening, I need it to progressively spawn chaingunners. I can't figure this out. It seems as if I have to have everything happen at once. This is what I have so far, and I don't necessarily want someone to do it for me, but I'd like a walkthrough so I understand and can repeat it. (Thanks!)

 

#include "zcommon.acs"

script 1 (void)
{
    Ceiling_RaiseByValue(1, 1, 120);
    Thing_Spawn(3, T_CHAINGUY, 90);
    
}

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0
 #include "zcommon.acs"

script 1 (void)
{
    Ceiling_RaiseByValue(first one);
    delay (35*needed_seconds);
    Thing_Spawn(first chaingunner);
		delay (35*needed seconds);
    Ceiling_RaiseByValue(second one);
    delay (35*needed_seconds);
    Thing_Spawn(second one);
		delay (35*needed seconds);
    Ceiling_RaiseByValue(third one);
    delay (35*needed_seconds);
    Thing_Spawn(third one);   
} 

35 means "35 tics (read as "1 second"). Some people do 36 instead of 35, because "read the wiki". Anyway, quick maths. 35 * 3 = 3 seconds. 35 * 10 = 10 seconds

Share this post


Link to post
  • 4

In addition, I'd recommend checking out https://zdoom.org/wiki/TagWait - this function will cause the script to pause until the tagged sector has stopped moving. Depending on the effect you're trying to achieve, it can be a lot easier to use and lower maintenance.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...