I know this is possible, but as a complete ZScript (and ACS for that matter) novice I'm struggling to get my head around how to implement it myself. Ever since the migration to ZScript, the wiki is somewhat light on examples I can learn from (unless I'm looking in the wrong place, which is entirely possible).
Basically, I'm looking to rebuild Shuffle from the ground up so that it resembles something that isn't a complete mess. This involves incorporating all of the separate player classes into the main .pk3. Currently, each player .pk3 has their own set of spawners which override the main one to prevent any weapons/ammo/items they can't use from spawning. What I'm looking to do is set up a script that performs this override on map load based on the class the player is using.
I did try this a few years back - I thought of giving each class a unique dummy inventory item that identifies the class, and while what I tried at the time almost worked for items and weapons, it still spawned everything else (albeit invisibly) and I never got around to figuring out how to implement it for monsters before I gave up.
I would really like to try this again, but I fear a bit of hand-holding may be in order. Any help would be appreciated, as always.
Changing thing spawns based on player class?
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!)
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!)
- stainedofmind
- Posts: 203
- Joined: Sun Sep 01, 2019 10:59 am
Re: Changing thing spawns based on player class?
Threw together a quick example pk3 for you that hopefully does what you want. I didn't feel like fake coding classes, so I used Final Doomer+ (viewtopic.php?t=55061) as a vehicle to execute the code.
I made a couple of wonky Medikits that use Megasphere and Soulsphere graphics instead, and if you select Plutonia Guy or TNT Guy as classes, they'll spawn instead of normal medikits.
Hopefully this helps! Please do note, this is just one way to go about doing the replacements, so I'm sure there may be better ways, and I'm not the absolute best coder, but this should be a place to start. Lemme know if there's anything more you need to know!
Also I'd like to say a big thank you, as your shuffle mod was my first "go-to" doom mod back in the day when I started to get into dooming, so I'm looking forward to a modern version!
I made a couple of wonky Medikits that use Megasphere and Soulsphere graphics instead, and if you select Plutonia Guy or TNT Guy as classes, they'll spawn instead of normal medikits.
Hopefully this helps! Please do note, this is just one way to go about doing the replacements, so I'm sure there may be better ways, and I'm not the absolute best coder, but this should be a place to start. Lemme know if there's anything more you need to know!
Also I'd like to say a big thank you, as your shuffle mod was my first "go-to" doom mod back in the day when I started to get into dooming, so I'm looking forward to a modern version!
- Attachments
-
som_proto_class_rep.pk3
- (1.05 KiB) Downloaded 2 times
Re: Changing thing spawns based on player class?
This looks like precisely what I need, and a lot easier to decipher than some of the code from other mods I've looked at. Much appreciated!
Glad you've enjoyed Shuffle in the past - suffice to say that a full rebuild is a lot of work given the sheer amount of content to migrate over, so the new version will be a ways off still, but hopefully I'll have more to show soon enough!
Glad you've enjoyed Shuffle in the past - suffice to say that a full rebuild is a lot of work given the sheer amount of content to migrate over, so the new version will be a ways off still, but hopefully I'll have more to show soon enough!