Can some verify this for me? I know it may be ugly, but hey...it's my first ACS script:

#include "zcommon.acs"

int monkill;

script 1 OPEN
{
monkill = 0;
}

script 2 (void)
{
monkill += 1;
if (monkill == 3)
{
Floor_LowerByValue(1,1,128);
}
}


I want to make it so that after you kill three monsters, a floor lowers...and also whenever I try to compile a script within Wad Author, it just says "Could not complie script"...what is wrong with that?

Share this post


Link to post

Well, I made the map, copied the script in WA and compile it and it works ok, the map too . Do you have acc 1.21 ? I only get the "Thing 0-1-2 has a bad script number" but everything is fine and works like it should.

edit: Oh and it need to be in a folder with 6 or less characters or it wont work too. Put WA in a folder like C:\editor\ . I've had that trouble when WA was in a folder like C:\Mes documents\Sébas\jeux\wa\

Share this post


Link to post
Darkstalker said:

I only get the "Thing 0-1-2 has a bad script number"

Open the zcommon.acs that came with ACC 1.21 and do what the comments near the top of the file say (i.e., uncomment the line about WadAuthor).

Share this post


Link to post

that script doesn't look right

try this

script 1 (void)
{
while (thingcount(T_ZOMBIE, 1))
{
delay (1*35);
}
"enter your actions here"
}


assign the 1 for the tid tag on the monsters and assign the script activate as the thing special. (I am going this through deepsea so it might look different from the editor your're using)


or if you got various monsters, try this:

lets say you got 2 pairs of monsters: 2 troopers and 2 imps.

int mapvar = 0;
script 1 (void)
{
while (thingcount(T_ZOMBIE, 1))
{
delay (1*35);
}
mapvar++;
if(mapvar == 2)
{
"enter your actions here"
}
}

script 2 (void)
{
while (thingcount(T_IMP, 2))
{
delay (1*35);
}
mapvar++;
if(mapvar == 2)
{
"enter your actions here"
}
}

that should do it.

remember be sure you assign the tid correctly and assign the script to those things.

Share this post


Link to post

Thanks Deathman, you rule dude. Champ.

And Darkstalker, it has to be on the root C: ?
EDIT: It doesn't, thanks so much. This makes me very happy. Indeed.
EDIT EDIT: Weird, all of the things I couldn't get to work before (pressing plus and minus to zoom in/out) now work. Stupidness. Actually it is good, but yeah. I'll stop editing now.

I hope not.

Oh well.

Thanks for all your help guys. :D

Share this post


Link to post

I used that first script, the one about only one type of monster...it says T_ZOMBIE but I used it on 3 Imps, and it still worked? Huh? It doesn't matter, just wondering why the hell it did that...

Share this post


Link to post
mmnpsrsoskl said:

And Darkstalker, it has to be on the root C: ?


Rex? told me once that if WA is in a directory that has more than 6 character, the compiler don't work. On my computer, WA was in
C:\Mes documents\Sébas\jeux\wa. The "Mes documents" had more than 6 character so the compile button always told me the script had problem but it didn't. Since it's in C:\editor the script compiles ok.

Share this post


Link to post
Darkstalker said:

C:\Mes documents\Sébas\jeux\wa

The problem is the BLANK after Mes. WA doesn't put quotes around the file names. It should be ok with long file names (other than ones with blanks) - which is a guess on my part since it would be weird if it didn't:)

Share this post


Link to post
mmnpsrsoskl said:

I used that first script, the one about only one type of monster...it says T_ZOMBIE but I used it on 3 Imps, and it still worked? Huh? It doesn't matter, just wondering why the hell it did that...


better go ahead and change T_ZOMBIE to T_IMP.


just to be safe ;)

Share this post


Link to post

Where can I get a umm...scripting thingie :) heh, I've never done anything with scripts before. I tried acc 1.21 but it didn't load up.

Share this post


Link to post

mmnpsrsoskl: just to make sure, you script *should* work fine, and is way more elegant (short) than Deathman's scripts.

Doom II Guy: You have to write the scripts yourself, ACC ist just the compiler for them :)

Share this post


Link to post

Where can I get a umm...scripting thingie :) heh, I've never done anything with scripts before. I tried acc 1.21 but it didn't load up.


it be easier if you use Deepsea to implent the script for you.

btw, for making scripts, [shamelesspimping] try my editor it has a reference page and easily sets up a new script for you...[/shamelesspimping]

but you could look around the Zdoom forums and editing docs as well at Zdoom's site.

Share this post


Link to post
boris said:

mmnpsrsoskl: just to make sure, you script *should* work fine, and is way more elegant (short) than Deathman's scripts.


Thanks, yeah I tried it now that Wad Author is running from a directory of 6 letters (C:\Files\DooMEd\WadAut) and the compiler works excellent...

And yeah deathman, your first script works wonders with only one type of enemy, but yeah, the second script didn't...you couldn't give a variable a value when defining it...and when I tried to compile, it kept coming up saying that a I was missing a ( on the

while (thingcount(T_ZOMBIE, 1))

line, i think it was...but hey. it doesn't matter. Thanks for the help guys!

shamelesspimping

Your editor is pretty good, what are you coding it in, maybe I can give a hand.

Share this post


Link to post
mmnpsrsoskl said:

Your editor is pretty good, what are you coding it in, maybe I can give a hand.


Delphi, I think. IIRC he wrote that in some other thread. Or maybe it was someone else. Whatever.

Share this post


Link to post
mmnpsrsoskl said:

Thanks, yeah I tried it now that Wad Author is running from a directory of 6 letters (C:\Files\DooMEd\WadAut) and the compiler works excellent...

And yeah deathman, your first script works wonders with only one type of enemy, but yeah, the second script didn't...you couldn't give a variable a value when defining it...and when I tried to compile, it kept coming up saying that a I was missing a ( on the

while (thingcount(T_ZOMBIE, 1))


really odd, that script example I posted is directly from my project, and it works. but of course if you want this script to work on another monster besides the zombie, the T_Zombie needs to be renamed to T_"whatevername" listed in ZCOMMON.acs and the tid must be assigned to that monster along assigning the thingspecial/script_execute special to it/them.

scripting can be wired sometimes...:p

Share this post


Link to post

I did that all, made sure the monsters where the right type and everything, it looked fine but didn;t work. Meh. No sweat.

Share this post


Link to post
mmnpsrsoskl said:

a directory of 6 letters (C:\Files\DooMEd\WadAut) and the compiler works excellent...

As I noted above - the only rule is that you can't have a BLANK in the directory path. It's OK to have more than 6 characters. It's ok to have more than 8 too. So make those names meaningful:)

The Deathman scripts compile without errors. Check your typing and check your version of ACS. I tested both with DeePACC 11.6 and ACC 1.21.

Share this post


Link to post
This topic is now closed to further replies.