Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
printz

[Regular Hexen] ACS scripts don't execute

Recommended Posts

Weird; once I made a modification to the scripts, using Doom Builder (1), they stopped working for vanilla Hexen and ports which try to emulate it closely (like JHexen). It works in ZDoom, but I'm not making the level for ZDoom.

All script linedefs point to the correct level, 1. The level IS 1:

MAPINFO

; --- Cluster 1 ---

map 1 "CASTLE OF FEAR"
warptrans 1
next 2
cluster 1
sky1 SKYWALL2 0
sky2 SKY2 40
doublesky

;;; the rest follow
And here's the MAP01 script source code lump. It looked similar when it worked. I deleted the latter functions, then rewrote them.

The script source lump (called here SCRIPTS)
#include "common.acs"

int door1open;
int door3open;
int door4open;

// Initial fireballs
script 1 (void)
{
	ThingSound(1,"FireDemonAttack",96);
	Thing_Projectile(1,T_FIREBALL1,0,80+random(10,40),random(0,3));
	ThingSound(2,"FireDemonAttack",96);
	Thing_Projectile(2,T_FIREBALL1,128,80+random(10,40),random(0,3));
	delay(30);
	restart;
}

// left rotation
script 2 (void)
{
//	if(!door1open)
	//{
		Polyobj_RotateLeft(1, 8, 64);
		door1open=1;
	//}
}

script 3 (void)
{
	if(door3open==0)
	{
		Polyobj_RotateLeft(3, 8, 64);
		door3open=1;
	}
}

script 4 (void)
{
	if(door4open==0)
	{
		Polyobj_RotateRight(4, 8, 64);
		door4open=1;
	}
}
The first script is a repeated fireball thrower, which is started and suspended by linedefs. The latter three are once-only turndoor openers. Does vanilla Hexen support arrays, and can I declare arrays with a #defined capacity?

So far all the global variables appear to be defined at start as 0 (while testing on ZDoom), so I haven't bothered setting them at an OPEN script. It's not their fault that the scripts don't work in vanilla; Script 1 doesn't depend on variables so it should work.

I even commented out that if(!door1open), and that script still didn't call. No scripts were called, even though the once-only linedefs I was using seemed to work (I heard nothing at the first activation; only afterwards 'oofs').

What could I be doing wrong, if the ACS-doing linedefs have their second argument correct, it works in ZDoom but not vanilla or JHexen and I'm using Doom Builder 1 and ZDBSP no-REJECT (the only nodebuilder command that Doom Builder 1 can run succesfully under Hexen maps)?

Share this post


Link to post

Apparently the scripts got compiled in ZDoom mode which uses a different binary format. Seems to me that DoomBuilder needs to explicitly handle that switch when using ZDoom's ACC to compile.

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
Sign in to follow this  
×