Hi ArcturusDeluxe, I've gotta say love your work here. Really good is v1.0.3. So good I've been creating some levels for it. One question though, how do I make a level start with music or add it using the (80) ACS Execute Script? I've noticed you use alot of them, triggering the music when a player crosses a linedef, but how do I add it so it plays, is it a library file it pulls the script info from? It always comes back unknown script when I try and play the CD32 ogg file or remake soundtrack in the game? Any help is appreciated.
Hi! That's so cool that you're making maps for this!
To start with music, you need to use an
#include "acs/osiris.acs"
at the top of the map's ACS code. AB3DMusicChange is what you want (first argument sets the soundtrack, 0 = modern, 1 = CD32, second is the track name) but note that it's a function so it needs to be called from inside a script, you can't trigger it directly from an ACS Execute linedef action.
To have it play at the start just put it in an OPEN script. See the ACS code inside the currently existing maps for examples. There's also a script to fade the music in, AB3DMusicFadeIn, which I recommend at the beginning because the remake songs loop so they start quite abruptly.
Hope that helps! Let me know when you're ready to show your maps, I'm excited to try them!
Hi Arcturus,
Thanks for the info. Still abit confused. The ACS code inside the current maps? are we talking about the ZMAPINFO file or the following file acs/osiris.ocs file? or do I have to add the include entry into the ZSCRIPT file? Is the ACS code for the maps in the ZMAPINFO file? For example, I cannot do this for it to work?
Map MAP18 "$MAP18_NAME"
{
#include "acs/osiris.acs"
LevelNum = 18
Cluster = 1
Music = "music/cd02.ogg"
Sky1 = "ASKY1"
Next = "MAP19"
}
or{
#include "acs/osiris.acs"
LevelNum = 18
Cluster = 1
AB3DMusicChange 0, cd02
Music = ""
Sky1 = "ASKY1"
Next = "MAP19"
}
All the music entries in the ZMAPINFO file are like this "" so I am trying to understand where the game is actually taking the music from when the level is loaded. I have looked at your TEST map which I see you can trigger music and wind sounds etc.. It seems to pull it from a script number, but I cannot see the info for the script. I would prefer to be able to use both, trigger music when entering a new level and also to have no music, but trigger it in game for dramatic effect like in your TEST map for example.
In terms of the maps , I am making an expansion so the maps are starting from MAP18 onwards.
Kind Regards,
Alien3DAmiga
Ah sorry, I guess I got ahead of myself. This is nothing to do with MAPINFO. Are you using Ultimate Doom Builder? If so, press F10 or click the Open Script Editor button (like a white document with a red bug next to it, towards the left of the toolbar), it will show you all the ACS scripting in a level. This is all code that tells maps what to do at specific points, like doors/lift triggers, music changes, and HUD messages (all the scrolly intro text sequences are just really fancy ACS scripts, for example). The #include goes at the top of this part and the AB3DMusicChange() goes within a script.
This page on the ZDoom wiki has a beginner's guide about it and there's loads of information on the wiki in general. And feel free to look at the scripts in the Osiris maps for reference. I'm not familar with other map editors, but if you're not using UDB let me know and I'll see how to do the same in whatever map editor you're using.
Hi Arcturus,
Ah! no worries. I am using the Slade Editor v3.1.13 for editing. It does allow me to view the scripts and edit map info and add textures. Adding water and 3D floors for example are fine. I am wondering if Slade doesn't allow for certain edits, or to view certain files. If you have info about Slade, or like you say, can show me how to access the music then please let me know. I'll check out Ultimate Doom Builder too. I've used Doom Builder 64 and Doom Builder 2.0 in the past. Thanks for the help, most appreciated.
Kind Regards,
Alien3DAmiga
So I had a look, in the SLADE map editor, go to View, Windows and Script Editor. Or press Ctrl+5. This is where you enter ACS scripts. Don't get it confused with the Script Manager which seems to be for SLADE-specific scripts! Anyway if you do this in the Osiris maps you'll see how I did stuff. From the regular SLADE interface you can also just click into one of the wads in the pk3 and click on SCRIPTS to also have a look. You'll see a similar bit of code near the top, within "script 100 OPEN", in each map, which does stuff related to the intro texts and then sets the music when the map loads.
So on your own maps, I expect you'll just get an empty document when opening the Script Editor (unless you've done some other ACS stuff). So basically for now I'd recommend putting the following bit of code in here:
#include "zcommon.acs" #import "acs/osiris.acs" script 100 OPEN { SetMusicVolume(0.0); AB3DMusicChange(0, "lventry"); AB3DMusicChange(1, "cd01"); ACS_NamedExecute("AB3DMusicFadeIn", 0, 1, 0, 0); }
Feel free to replace lventry and cd01 with your own choices of course. You should save and then click the blue down arrow at the top of the window afterwards to compile the code. If you get a message with copyrights and Raven Software and such, it's worked. If you get error messages here let me know.
Also I just realised I gave you the wrong code before, it's #import "acs/osiris.acs", not #include. Ooops! Sorry about that, I was going on memory and its been a bit since I was working on the scripting stuff. Also sorry that such a seemingly simple thing as music choice is kinda complicated, instead of just being able to change the MAPINFO, had to do it this way to get the multiple soundtrack options and dynamic bits, though it's probably a bit overengineered!
Yeah I'm getting the same message actually. I can't pin down why? It just doesn't want to use the script from the main file. It does seem to compile in Ultimate Doom Builder though. I'm looking into it. BTW this message thread is starting to look a bit ridiculous on here, and no PMs on itch.io it seems - you got Discord?