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

Compiling Scripts in ZDoom\WA

Recommended Posts

Alright, I have been editing Doom for years, but I have decided to
move on to ZDoom. I got the WCF files, loaded them into WadAuthor,
messed with the special tags a bit (mirrors are fun ;), but now I
want to do some scripting.

So, I figure out how to open the script editor, and I make a basic
script:

script 1 OPEN
{
  print(s:"This is my script.");
}
And I press 'Compile'. I get a little box saying that there were no
errors found, and so I assume everything is fine. When I play the WAD,
nothing happens. So I change the script to this:
script 1 (void)
{
  print(s:"This is my script.");
}
And make a switch to execute script #1. Compiles fine and runs. I
hit the switch and I get a message saying "Invalid Script" (or something).

Now I know something is definately up. I go into the script editor,
and edit my script so that it is this:
alkdqfoadfm4tlakgoiadnfg
asdflkg

agafghjfga
And once again I press compile. "No Errors Found". ARGHHH!! I downloaded
the latest ACC from the ZDoom site, read the tutorials, and AFAIK, it
should work.

Any ideas?

Share this post


Link to post

I think I know what it is. The script you showed is missing the line:

#include "zcommon.acs"

at the top of the scripts page. Hexen scripts all have #include "common.acs" instead. If yours has neither, that could be why.

I'm not sure if it is that, but I can get messages to appear on the open script without any trouble, and I have that line at the top.

Share this post


Link to post

That may be it. Also, in the zcommon.acs file (a text file), you need to edit it. See the // in front of #wadauthor....delete the //.

Also note that zcommon.acs calls three other files. You need them too. I think they all come with acc.exe and should be in the same folder.


//**************************************************************************
//**
//** zcommon.acs
//**
//**************************************************************************

// If you intend to use ACC 1.19 (or higher), with WadAuthor, you should
// uncomment the following line so that WadAuthor's error checker can
// properly detect bad scripts attached to lines:
//#wadauthor

#include "zspecial.acs"
#include "zdefs.acs"
#include "zwvars.acs"

Share this post


Link to post

I have a problem similar to this, only it's with DeepSea.
The script I have is very basic, and it runs as follows:

#include "zcommon.acs"

Script 1 OPEN

{
(print: (s:"Welcome to Doom. Enjoy your stay.");
}
Now, when I try to compile it, Deepsea tells me it's an "invalid statement." WTF?

Share this post


Link to post

Well, I got the script compiled successfully and all. I saved the script as SCRIPT1. I saved it to level E1M1. I tagged a line ACSAlwaysExecute, and set the script as 1, and the map as 1. However, when I load the level up, and I walk across the line, instead of flashing the script, I get an error saying P_STARTSCRIPT: UNKNOWN SCRIPT 1, and then it disappears. Now what?

Share this post


Link to post
DooMBoy said:

Well, I got the script compiled successfully and all. I saved the script as SCRIPT1. I saved it to level E1M1. I tagged a line ACSAlwaysExecute, and set the script as 1, and the map as 1. However, when I load the level up, and I walk across the line, instead of flashing the script, I get an error saying P_STARTSCRIPT: UNKNOWN SCRIPT 1, and then it disappears. Now what?


I've never used ACS_AlwaysExecute before, have you tried it with plain old ACS_Execute?

Also, you don't need to set the map to 1 (the 2nd argument), as leaving it at 0 means the script runs on the current map. (the only time you need the 2nd argument is when you want the line to run a script on another map in the same wad)

Share this post


Link to post

The only difference between ACS_Execute and ACS_ExecuteAlways is, that the latter allows more than 1 instance of the script to be run at a time.

Share this post


Link to post

OK, I have another problem. :)

hudmessage(s:"this is a test";1,0,6,1.5,0.5,3,6);
The text just flickers on and off the screen really fast. I tried changing
the last two numbers to huge things, but to no avail. :-\

Share this post


Link to post

doomboy, i can help you, you dont need a ( infront of printf-thats why it wont read it

Share this post


Link to post

srry vf, cant help u there, i only know the basics of hexen (excluding polyobjs)

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
×