Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Gustavo6046

ACS repeat until player has leaved sector

Recommended Posts

I made the following script:

#include "zcommon.acs"

var bool bSWPRSD

script 1 OPEN {
    bSWPRSD = true;
}

script 2 OPEN {
    if (bSWPRSD==true) {
        Print(s:"Gravity lift activated.")
        SetGravity(-200);
        until () {
            Delay(5);
            continue;
        }
        SetGravity(800);
        Print(s:"Gravity lift finished.")
    }
}
The until() in script 2 should execute until player is not anymore in sector of tag 4.

Share this post


Link to post

Use one of these things in the sector in question, give it for special to run a script that'll set bSWPRSD to false, change your until to until (bSWPRSD == false).

Note that in UDMF you can set a sector's gravity directly, which can be a more elegant solution than using a script to change the entire map's gravity while the player is in a sector.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×