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

Please help an ACS newb

Recommended Posts

I can't get any stuff to compile properly. I downloaded ACC 1.33 Win version and tried to compile the following script:

#include "zcommon.acs"

script 1 OPEN
{
hudmessage (this is a test; 2, 1, 2, 1.5, 0.5, 3, 2, 2);
}

---------------
I then get the following error message:

Unknown cast type in print statement: (cursor points at "t" (of "this"))
Mission colon: (cursor points at "s" (of "this"))
---------------

When I add "void SetFont(BIGFONT);" I get:

Invalid statement: (cursor points at "d" (of "void"")


What am I doing wrong?

Share this post


Link to post

Try

#include "zcommon.acs"

script 1 OPEN
{
hudmessage (s:"this is a test"; 2, 1, 2, 1.5, 0.5, 3, 2, 2);
}
Maybe without the "s:", I can't remember.

Share this post


Link to post

This worked, but when I put the .o file in my wad, nothing happend in the game :-(

I loaded the map in Wintex and then I loaded a new entry from file. I picked COLORMAP and later renamed it to BEHAVIOR. But no text is displayed in game. :-(

Share this post


Link to post

What editor are you using? WAD Author, Doombuilder and Deepsea have built-in script editors that will make sure your BEHAVIOR lump is at the correct place.

Share this post


Link to post

Mmm, I tried moving the BEHAVIOR lump by dragging and dropping it behind the map data, but it did not work. How can I move entries around in Wintex?

*EDIT*: I downloaded lumptool, which lets me move the entries around, easily. I then tested the .wad with every possible position of BEHAVIOR. When it was just above all Map entries, nothing happened. BEHAVIOR being at the very end of the map entries, ZDoom would load the map, but the BLOCKMAP seemed to be broken (I could walk through walls and trees and the monsters ignored me).
When I positioned BEHAVIOR right in the middle of the map entries, I got a crash everytime the map loaded.

So my script does not seem to be right? But it did compile properly and it´s just one hudmessage. I don`t understand this.
btw: I was using ZDoom 2.94

Share this post


Link to post

Hmm, try to replace all integer values with floating point ones. I.E. when you have "3" replace it with "3.0".

Share this post


Link to post

I tried that. I even coppied some examples of code from ZDoom.org - nothing works! ZDoom crashes. I even tried this example:

#include "zcommon.acs"

script 1 OPEN
{
Print(s:"This is a string");
}

It doesn't work, ZDoom crashes. I tried with 2.0.94 and 2.0.63a.
ACC is version 1.33

Nothing works. I am at the end of my knowledge. :-(

I created the map with a Vanilla editor. Do I maybe have to convert the map to ZDoom, before adding BEHAVIOR?

Share this post


Link to post
Deathmatcher said:

I created the map with a Vanilla editor. Do I maybe have to convert the map to ZDoom, before adding BEHAVIOR?

That could be the problem. I don't know how ZDoom determines whether it's a Doom or Hexen format map. But if it uses the BEHAVIOR lump to do so it will most likely crash.

Share this post


Link to post
Deathmatcher said:

I created the map with a Vanilla editor. Do I maybe have to convert the map to ZDoom, before adding BEHAVIOR?

Absolutely!

Share this post


Link to post
boris said:

That could be the problem. I don't know how ZDoom determines whether it's a Doom or Hexen format map. But if it uses the BEHAVIOR lump to do so it will most likely crash.



ZDoom uses the presence of the BEHAVIOR lump so adding one to a Doom format map will most certainly result in a crash.

Share this post


Link to post

Yes, the BEHAVIOR lump (which must follow the BLOCKMAP lump) is the way ZDoom and other ports/utilities (e.g. glBSP) detect that the level is in Hexen format (the LINEDEFS and THINGS lumps are different).

So I guess this means you have to use hexen format in order to use ACS scripting.

Share this post


Link to post

Round 2: I got the print command to run, everything fine. But hudmessage does't work! It compiles properly and the level loads, but: Nothing appears on screen, no matter how I format the code and change parameters! I even tried examples from the Zdoom-Forums. Does anyone know what might cause this? I think, I am using the latest versions of everything...

Share this post


Link to post

Make sure the script is activated by a player. OPEN scripts for example are not so you'd have to use hudmessagebold instead of hudmessage.

Share this post


Link to post
Graf Zahl said:

Make sure the script is activated by a player. OPEN scripts for example are not so you'd have to use hudmessagebold instead of hudmessage.


Yeah thanks. But I forgot OPEN anyway... now everything is fine. :-)

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
×