necros Posted June 9, 2024 (edited) Just wondering if it is possible to have the same function run at the same time? Using GZDoom, I have my ACS script like this for my UDMF level: while(TRUE) { for (int i = 30; i <= 36; i+=2) { ACS_NamedExecuteWait("powerRoom_fireBeam", 0, i, i + 1, 0); } } This works fine because the code waits until the first run of the function is done before starting another one. If I do this: while(TRUE) { for (int i = 30; i <= 36; i+=2) { ACS_NamedExecute("powerRoom_fireBeam", 0, i, i + 1, 0); Delay(70); } } It will skip every other function call because the function takes more than 70 ticks to complete. A more obvious example would be something like this: ACS_NamedExecute("powerRoom_fireBeam", 0, 30, 31, 0); ACS_NamedExecute("powerRoom_fireBeam", 0, 32, 33, 0); ACS_NamedExecute("powerRoom_fireBeam", 0, 34, 35, 0); ACS_NamedExecute("powerRoom_fireBeam", 0, 36, 37, 0); Only the first call will run, the others are just skipped. Is this a hard limitation? Am I doing something wrong? Edited June 9, 2024 by necros 0 Quote Share this post Link to post
1 Gez Posted June 9, 2024 (edited) You need ACS_NamedExecuteAlways if you want to have several instances of the same script running simultaneously. Alternatively, ACS_NamedExecuteWithResult will also work. Edited June 9, 2024 by Gez 0 Quote Share this post Link to post
0 necros Posted June 9, 2024 Awesome thank you! There are so many things in ACS scripting! 0 Quote Share this post Link to post
Question
necros
Just wondering if it is possible to have the same function run at the same time? Using GZDoom, I have my ACS script like this for my UDMF level:
This works fine because the code waits until the first run of the function is done before starting another one.
If I do this:
It will skip every other function call because the function takes more than 70 ticks to complete.
A more obvious example would be something like this:
Only the first call will run, the others are just skipped.
Is this a hard limitation? Am I doing something wrong?
Edited by necrosShare this post
Link to post
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.