"Game" and "SpawnID" property replacements for ZScript

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
XxMiltenXx
Posts: 219
Joined: Wed Jan 08, 2014 8:40 am
Graphics Processor: nVidia with Vulkan support
Location: Germany

"Game" and "SpawnID" property replacements for ZScript

Post by XxMiltenXx »

Hi.

In decorate you were able to specify the SpawnID and the corresponding game directly in Decorate in one mod:

Code: Select all

Actor MyDoomActor
{
	Game Doom
	SpawnID 1
}

Actor MyHereticActor
{
	Game Heretic
	SpawnID 1
}
In ZScript this is not possible. I am aware that you can specify the SpawnID as a SpawnNum within MapInfo, but I do not know however how to specify the corresponding game. Someone at Discord suggested to use IWADINFO, but I couldn't get that to work either.
How can I get that to work in ZScript without having to split the mod?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Game" and "SpawnID" property replacements for ZScript

Post by Graf Zahl »

This feature has been intentionally deprecated because it comes with a significant share of maintenance issues. The MAPINFO way is a lot less problematic.
You can use the lump filter feature to load different MAPINFOs for the games you support.
XxMiltenXx
Posts: 219
Joined: Wed Jan 08, 2014 8:40 am
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: "Game" and "SpawnID" property replacements for ZScript

Post by XxMiltenXx »

Ah, thanks. I wasn't aware of that lump filter, I'll try it out later.
Post Reply

Return to “Scripting”