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

Raise a 'timed' bridge with a script

Recommended Posts

I have a series of 64x64 sectors simulating a lowered runway, which I want to bring up to level for the player to go across, but would like the effect of each section of the runway to come up sequentially, one a few miliseconds appart from the previous one, giving the idea of the machine 'building' the runway through time. much like what we've seen in DooM 3. How would I come to do this with ACS?
I have 'some' programming knowlegde, but have never done anything with ACS. Although I'm willing to try and see if I get anything working to do this.
Please, be gentle and try to point me in the right direction.

Thanks for your time, guys.

Share this post


Link to post

Tag each sector in order, say 3 to 14 or something.

#include "zcommon.acs"

script 1 open
{
    int i;
    for(i=3;i<15;i++)
    {
        Floor_MoveToValue (i, 32, 128, 0);
        delay(100);
    }
}
Didn't actually test it, and even code that short often has bugs in it.

Also, if using doombuilder 2, make a new map 'doom in hexen' format, then click view script or whatever to write the code.

Also go to zdoom wiki, click the acs links on the left for functions etc.

Share this post


Link to post

ok, so this is what I did with what you told me
(in DooM Builder)

I opened the script editor and 'kinda' copy-pasted your code, then edited it to suit my map (sector tags, etc)
then, got a linedef with action #80 to get it to launch the script, configuring it to look for 'Script #1' to run.
saved the script and the map, and fired it up to 'Test' it.
when the map loaded in zDooM, the last line in the console was 'Scripts unloaded', which actually really boggles me, don't know if it's telling me no scripts will run...
then travelled through the whole map to that linedef that should trigger the script when pressed 'use' next to it, and nothing happened. in the hud a message showed up. it read: p_startscript: script 1 not found
or something much like that.
so, what am I doing wrong? I'm so excited, I feel I'm really close to getting this to work. I guess after knowing how to use ACS well, you can do anything with DooM, 'the sky is the limit', IYKWIM.
thank you guys for your help!
ps:if you want to, I can upload the 'work-in-progress' map so can see what Im trying to do

Share this post


Link to post

Hmm, I recall that I had the same problem once, but I just can't remember what was causing it back then...
Just to check the common mistakes:
-Did you add <#include "zcommon.acs"> at the top of your script?
-Did you compile your script? (I know you said you saved your script, but I'm asking just to be sure)
-Make sure to have the latest version of ACC! (http://zdoom.org/Download)

The 'Scripts unloaded' line in the console is definitely a sign that something is wrong, but I just can't tell what it is. gggmorks script itself works fine, so the problem must be somewhere else!

If nothing of the things mentioned above helps, it might indeed be a good idea to post your map and scripts here. Otherwise it's hard to analyze things in detail!

Share this post


Link to post

thanks vader for your much appreciated help. that was it, hadn't 'compiled' it. really something not to forget. now everything works like a charm, this script thingy is really the sh....t!!

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
×