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

ZDoom Scripting

Recommended Posts

Just started editing with ZDoom and I was wondering-how do you script things? Such as making a "Voodoo Doll" say something to you?

Share this post


Link to post

Here is the format for a simple script for a text message:

#include "zcommon.acs"

script 1(void)

{ print(s:"You shouldn't have picked me up.");
Delay(70);
print(s:"I'm the Voodoo doll from Hell!");
Delay(70);
}

Set up a linedef (or thing) to trigger the script, and use the ACS_Execute special. The first argument is the script number (in this case, the script number is 1). That's it.

For more tutorials on scripting, visit Rick Clark's tutorial pages.


Share this post


Link to post

Adding to ReX's example, you can also use the thingsound or ambientsound script commands to play a sound file, sound playing from a "point" (tagged thing or map spot) or a sound heard equally over a wide area. I think you'll see them in the reference. Zdoom also supports ambient sounds which are defined in the soundinfo lump (text file named sndinfo in the wad) which play from ambient sound things placed in the map. If I recall, those ambient sounds can either be point or world, that will be part of the specification in soundinfo. You can specify how often the sound is played, can make it random between some minimum and maximum time. Sounds played with thingsound or ambientsound also need to be identified as sounds in the soundinfo lump, unless you play one of the standard doom sounds by the standard name.

Share this post


Link to post

Here is the format for a simple script for a text message:

#include "zcommon.acs"

script 1(void)

{ print(s:"You shouldn't have picked me up.");
Delay(70);
print(s:"I'm the Voodoo doll from Hell!");
Delay(70);
}

Set up a linedef (or thing) to trigger the script, and use the ACS_Execute special. The first argument is the script number (in this case, the script number is 1). That's it.

For more tutorials on scripting, visit Rick Clark's tutorial pages.


Umm, I have a problem-there is no ACS_Execute special in any of the menus. BTW, I'm using DeePSea.

Share this post


Link to post

Umm, I have a problem-there is no ACS_Execute special in any of the menus. BTW, I'm using DeePSea.

I think we just have a naming difference here. There's an ACS_Execute special, it's in the ACS Scripts category - normally you use Script Run (80). You run SCRIPTS. No need to say ACS_blah_blah (Action Code Script) all the time:)

You may be in the right project, but just in case I'm just making sure you have the ZDOOMHEXEN project, NOT ZDOOM. ZDOOM has 2 different flavors. One is like BOOM - that's the ZDOOM project. The other is like HEXEN, that's the ZDOOM HEXEN project.

Convert you IWAD using ZWADCONV.exe (one of the ZDOOM ulities) and use this converted IWAD as the IWAD for the ZDOOMHEXEN project.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×